You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wrong import suggestions for JavaScript default exports #58590
If an npm package re-exports type definitions from nested paths, VS Code suggests wrong import paths for default exports. I noticed the issue when I tried to use packages from Atlassian's design system (e.g., @atlaskit/button), but I was able to reproduce it with a minimal example (see below).
The video below shows how VS Code suggests the correct path for the named export, but the wrong path for the default export. The expected result is import defaultExport, { namedExport } from "example";.
Could someone from the TypeScript team confirm the issue, perhaps Andrew Branch (@andrewbranch) (the author of the two pull requests I linked above)? Please let me know if there's anything I can do to help get this fixed.
Does this issue occur when all extensions are disabled?: Yes
If an npm package re-exports type definitions from nested paths, VS Code suggests wrong import paths for default exports. I noticed the issue when I tried to use packages from Atlassian's design system (e.g.,
@atlaskit/button), but I was able to reproduce it with a minimal example (see below).Steps to Reproduce:
README.md.The video below shows how VS Code suggests the correct path for the named export, but the wrong path for the default export. The expected result is
import defaultExport, { namedExport } from "example";.VS.Code.import.issue.mp4