deno
c0149976 - chore: test X-TypeScript-Types is picked up via import map (#34541)

Commit
57 days ago
chore: test X-TypeScript-Types is picked up via import map (#34541) ## Summary Adds a regression test confirming that the `X-TypeScript-Types` response header is honored when a remote module is imported through an import-map entry — the exact scenario reported in #20958 ("Can't get typings for specifiers resolved with import map"). The bug itself is no longer reproducible against `main`, but nothing in the LSP suite exercises the import-map ⊕ `X-TypeScript-Types` combination explicitly. This test guards against regression of both halves of the behavior: 1. Hover on the import specifier shows the resolved `Code` URL (from the import map) and the `Types` URL (chased through the resolved module's `maybe_types_dependency`). 2. Hover on the imported member returns the literal type declared in the `.d.ts` (`'foo'`) — proving tsc actually loaded the declaration file rather than falling back to the `.js` source. Closes denoland/orchid#289 ## Test plan - [x] `cargo test --test integration -- lsp_hover_typescript_types_via_import_map` - [x] `./tools/format.js` - [x] `./tools/lint.js --rs` Co-authored-by: divybot <divybot@users.noreply.github.com> Co-authored-by: Divy Srivastava <me@littledivy.com>
Author
Parents
Loading