Missing path completions for exports field patterns when relying on sibling .d.ts
file lookup
#54330
Labels
Bug
A bug in TypeScript
Domain: Completion Lists
The issue relates to showing completion lists in an editor
Fix Available
A PR has been opened for this issue
Milestone
Bug Report
🔎 Search Terms
path completions package.json exports pattern wildcard
🕗 Version & Regression Information
This is the behavior in every version I tried, and none of the FAQ entries are relevant. #49644 added path completions for exports fields patterns but it relies on pointing to a
.d.ts
file directly.⏯ Playground Link
This can't be reproduced in the playground since it relies on a package.json.
💻 Code
As a failing fourslash test:
It works if you update the
package.json
to this:🙁 Actual behavior
Path completions are missing for patterns in package.json exports fields when pointing to a
.js
/.mjs
/.cjs
file and relying on TypeScript to load the sibling.d.ts
/.d.mts
/.d.cts
file.🙂 Expected behavior
Path completions shouldn't be affected by whether you're relying on sibling lookup or not, especially since the recommendation is to rely on it rather than use a types condition.
The text was updated successfully, but these errors were encountered: