Title: Wrong import suggestions for JavaScript default exports · Issue #58590 · microsoft/TypeScript · GitHub
Open Graph Title: Wrong import suggestions for JavaScript default exports · Issue #58590 · microsoft/TypeScript
X Title: Wrong import suggestions for JavaScript default exports · Issue #58590 · microsoft/TypeScript
Description: Does this issue occur when all extensions are disabled?: Yes VS Code Version: 1.90.0-insider (a48f464) OS Version: macOS Sonoma 14.4.1 If an npm package re-exports type definitions from nested paths, VS Code suggests wrong import paths f...
Open Graph Description: Does this issue occur when all extensions are disabled?: Yes VS Code Version: 1.90.0-insider (a48f464) OS Version: macOS Sonoma 14.4.1 If an npm package re-exports type definitions from nested path...
X Description: Does this issue occur when all extensions are disabled?: Yes VS Code Version: 1.90.0-insider (a48f464) OS Version: macOS Sonoma 14.4.1 If an npm package re-exports type definitions from nested path...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/58590
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Wrong import suggestions for JavaScript default exports","articleBody":"\u003c!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ --\u003e\r\n\u003c!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ --\u003e\r\n\u003c!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions --\u003e\r\n\u003c!-- 🔎 Search existing issues to avoid creating duplicates. --\u003e\r\n\u003c!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ --\u003e\r\n\u003c!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --\u003e\r\n\u003c!-- 🔧 Launch with `code --disable-extensions` to check. --\u003e\r\nDoes this issue occur when all extensions are disabled?: Yes\r\n\r\n\u003c!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --\u003e\r\n\u003c!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help \u003e Report Issue' dialog can assist with this. --\u003e\r\n- VS Code Version: 1.90.0-insider (a48f464a3e01aad384703ec964018299b14bb7cf)\r\n- OS Version: macOS Sonoma 14.4.1\r\n\r\nIf 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`](https://www.npmjs.com/package/@atlaskit/button)), but I was able to reproduce it with a minimal example (see below).\r\n\r\nSteps to Reproduce:\r\n\r\n1. Clone this issue reproduction repository: https://github.com/klaussner/vs-code-import-issue\r\n2. Follow the steps in `README.md`.\r\n\r\nThe 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\";`.\r\n\r\nhttps://github.com/microsoft/vscode/assets/1312807/7a85fb0e-9cfb-4d35-a05b-48752b24fa2d\r\n\r\n\r\n","author":{"url":"https://github.com/klaussner","@type":"Person","name":"klaussner"},"datePublished":"2024-05-17T18:54:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/58590/TypeScript/issues/58590"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f86a2211-354e-5653-f4aa-0d4d56ca6f5b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C936:11FF7D:103791C:1767DED:6A5F498B |
| html-safe-nonce | 962c07bd923230c84dd6a720266bde3ed110244982267565b36de48e68b4a2f6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOTM2OjExRkY3RDoxMDM3OTFDOjE3NjdERUQ6NkE1RjQ5OEIiLCJ2aXNpdG9yX2lkIjoiODI5OTM1OTk4NTgyODA1NTQzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | bd92987d78c2e4ff525c034a3073490f6169d3ca3ebb2083c35a3b511b1d4280 |
| hovercard-subject-tag | issue:2306482641 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/58590/issue_layout |
| twitter:image | https://opengraph.githubassets.com/aa888d2181966d2f8d2c91342163bb1258161377186a178d13e85bc015cb6872/microsoft/TypeScript/issues/58590 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/aa888d2181966d2f8d2c91342163bb1258161377186a178d13e85bc015cb6872/microsoft/TypeScript/issues/58590 |
| og:image:alt | Does this issue occur when all extensions are disabled?: Yes VS Code Version: 1.90.0-insider (a48f464) OS Version: macOS Sonoma 14.4.1 If an npm package re-exports type definitions from nested path... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | klaussner |
| hostname | github.com |
| expected-hostname | github.com |
| None | ab2497d9345a59709926b385d88458fa5932c82ec066288448eb68b34cbcbbda |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ba0ac57287507693938b0a2de45402a22cda0785 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width