Title: "Remove 'type' from import" produces invalid syntax · Issue #55363 · microsoft/TypeScript · GitHub
Open Graph Title: "Remove 'type' from import" produces invalid syntax · Issue #55363 · microsoft/TypeScript
X Title: "Remove 'type' from import" produces invalid syntax · Issue #55363 · microsoft/TypeScript
Description: 🔎 Search Terms "Remove 'type' from import", IntelliSense, autocomplete, suggestion 🕗 Version & Regression Information I'm seeing this in VSCode, with all extensions disabled: Bundled TypeScript version: v5.1.0 Version: 1.81.0 Commit: 644...
Open Graph Description: 🔎 Search Terms "Remove 'type' from import", IntelliSense, autocomplete, suggestion 🕗 Version & Regression Information I'm seeing this in VSCode, with all extensions disabled: Bundled TypeScript ver...
X Description: 🔎 Search Terms "Remove 'type' from import", IntelliSense, autocomplete, suggestion 🕗 Version & Regression Information I'm seeing this in VSCode, with all extensions disabl...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/55363
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\"Remove 'type' from import\" produces invalid syntax","articleBody":"### 🔎 Search Terms\r\n\r\n\"Remove 'type' from import\", IntelliSense, autocomplete, suggestion\r\n\r\n### 🕗 Version & Regression Information\r\n\r\nI'm seeing this in VSCode, with all extensions disabled:\r\n\r\nBundled TypeScript version: v5.1.0\r\n\r\nVersion: 1.81.0\r\nCommit: 6445d93c81ebe42c4cbd7a60712e0b17d9463e97\r\nDate: 2023-08-02T12:38:28.722Z (1 wk ago)\r\nElectron: 22.3.18\r\nElectronBuildId: 22689846\r\nChromium: 108.0.5359.215\r\nNode.js: 16.17.1\r\nV8: 10.8.168.25-electron.0\r\nOS: Darwin arm64 22.6.0\r\n\r\n### ⏯ Playground Link\r\n\r\nN/A\r\n\r\n### 💻 Code\r\n\r\nUse the following files:\r\n\r\n```ts\r\n// main.ts\r\nimport { TwistyAlgEditor, type TwistyPlayer } from \"./other-file\";\r\n\r\nnew TwistyPlayer();\r\n\r\n// other-file.ts\r\nexport class TwistyAlgEditor {}\r\nexport class TwistyPlayer {}\r\n```\r\n\r\nThen attempt to select the `Remove 'type' from import of 'TwistyPlaver' from \"cubing/twisty\"` suggestion for `new TwistyPlayer`:\r\n\r\n\u003cimg width=\"945\" alt=\"Screenshot 2023-08-14 at 19 26 33\" src=\"https://github.com/microsoft/TypeScript/assets/248078/e8f3a9a6-8484-4664-95b0-da8cae37d31d\">\r\n\r\n\r\n### 🙁 Actual behavior\r\n\r\nThe code is rewritten to:\r\n\r\n```ts\r\nimport { TwistyAlgEditorTwistyPlayer, } from \"./other-file\";\r\n\r\nnew TwistyPlayer();\r\n```\r\n\r\n### 🙂 Expected behavior\r\n\r\nThe code is rewritten to:\r\n\r\n```ts\r\nimport { TwistyAlgEditor, TwistyPlayer } from \"./other-file\";\r\n\r\nnew TwistyPlayer();\r\n```","author":{"url":"https://github.com/lgarron","@type":"Person","name":"lgarron"},"datePublished":"2023-08-14T10:30:18Z","url":"https://github.com/microsoft/TypeScript/issues/55363"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:fed3ee71-816e-13ef-1b88-f480e10816c7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E1A4:269AD9:1F66E74:29F0DC4:6B01797F |
| html-safe-nonce | 2afc109983fcc838cf16667ff9ef2b461952771990706cf76d91ad9171e17a1d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMUE0OjI2OUFEOToxRjY2RTc0OjI5RjBEQzQ6NkIwMTc5N0YiLCJ2aXNpdG9yX2lkIjoiNzY0MDY4ODY0MDcyOTcyNjcxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f158b74d6403d3875dba8492f4559eaca3a3ce2f24e6aeef9e48e9f486f06992 |
| hovercard-subject-tag | issue:1849496233 |
| 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/55363/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0ee7ceb65e856b1fffd6d8dd1cd00b264b5dd96b1dffc97752d74a0a78c46258/microsoft/TypeScript/issues/55363 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0ee7ceb65e856b1fffd6d8dd1cd00b264b5dd96b1dffc97752d74a0a78c46258/microsoft/TypeScript/issues/55363 |
| og:image:alt | 🔎 Search Terms "Remove 'type' from import", IntelliSense, autocomplete, suggestion 🕗 Version & Regression Information I'm seeing this in VSCode, with all extensions disabled: Bundled TypeScript ver... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lgarron |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width