TypeScript 7 VS Code extension: a workspace "typescript" 7.x package is not detected, only "@typescript/native-preview", which is no longer published
メンテナーはふだん 1 日以内に返信
@jakebailey がすでに取り組んでいます。
2026年10月6日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 84/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript, vscode
調査の方向性
packages/vscode-typescript/src/session.ts から始め、特に findWorkspaceNativePreviewPackages を確認し、promptUseWorkspaceVersion と promptSelectVersion がその結果をどのように利用しているかを調べます。既存の @typescript/native-preview の検出を、typescript パッケージおよび pathHasTsserverJs と比較します。TypeScript 7+ のワークスペースパッケージが検出され、ワークスペースプロンプトとバージョンピッカーでそれが提示され、拡張機能がそのコンパイラーを選択すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
The TypeScript 7 extension finds a workspace's own TypeScript 7 only in node_modules/@typescript/native-preview. That package was last published on 2026-07-07 (7.0.0-dev.20260707.2). TypeScript 7 now ships as typescript: [email protected] came out the next day, and the 7.1 nightlies ship as typescript@next (7.1.0-dev.20260930.4 today). So a project that installs TypeScript 7 the current way runs the extension's bundled compiler instead of its own. Nothing tells the user, and the only fix is to write a tsdk setting by hand.
Versions: TypeScript 7 extension 1.0.1, VS Code 1.140.0, macOS.
Repro
- In an empty folder, run
npm install -D typescript@nextand addmain.tswithexport const n: number = 1;. - Open the folder in VS Code with the TypeScript 7 extension installed, and open
main.ts. No setting is needed: on its first start, the extension turns TypeScript 7 on by itself (it writes"js/ts.experimental.useTsgo": trueinto the user settings). If TypeScript 7 was turned off later, run TypeScript: Enable TypeScript 7 Language Server.
Expected: the extension offers the workspace's TypeScript, as it does for @typescript/native-preview: the "This workspace has TypeScript 7 installed" prompt, and Use Workspace Version in TypeScript: Select TypeScript Version.
Actual: no prompt, and the server runs the extension's own compiler (7.0.2), not node_modules/typescript (7.1):
…/extensions/typescriptteam.native-preview-1.0.1-darwin-x64/lib/tsc --lsp --stdio
With "js/ts.tsdk.path": "node_modules/typescript", the same project runs the workspace compiler. So only the detection is missing: resolveTsdkPathToExe already accepts a typescript package (bin tsc).
Where
In packages/vscode-typescript/src/session.ts (main at 43521c80), findWorkspaceNativePreviewPackages checks only node_modules/@typescript/native-preview. Both promptUseWorkspaceVersion and the version picker (promptSelectVersion) use it.
Suggestion
Also detect node_modules/typescript when it is TypeScript 7 or newer. pathHasTsserverJs already tells a TypeScript 5 or 6 package apart from a TypeScript 7 one.
Why it matters
- The editor and the project's
tsc(CLI, CI) then run the same compiler. - Features that need a 7.1 nightly, such as content mappers with
--runExternalCode, now need either the TypeScript 7 Nightly extension or a hand-writtentsdksetting. The Nightly extension applies to every workspace and changes daily. Thetsdksetting is easy to miss, because the extension never mentions it.
- 主要言語
- Go
- スター
- 111k
- フォーク
- 15.5k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 158
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/TypeScript のほかの issue
-
Class names `eval` and `arguments` are not reported as invalid strict mode bindings対応中かも @dmety が今日担当しました。 オープンBug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/TypeScript#64661 ·
メンテナーはふだん 1 日以内に返信
-
Non-enum CLI options with multiple values separated by comma and space aren't whitespace trimmed対応中かも @RyanCavanaugh が 1 日前に担当しました。 オープンBug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/TypeScript#64618 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
`EFNoLeadingComments` suppresses synthesized leading comments in tsgo; Strada only suppresses source comments対応中かも @weswigham が 8 日前に担当しました。 オープンNeeds Investigation
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
microsoft/TypeScript#64453 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
enhance: Add tests for premature caching of contextual parameter types対応中かも @luchenxu73 が 22 日前に担当しました。 オープンPossible Improvement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/TypeScript#64278 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
dom.generated.d.ts is missing from this repo while still referenced in the docs再び着手できるかも @seanxuu が 35 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンDocs
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
microsoft/TypeScript#64118 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
microsoft/TypeScript の issue をすべて見る
似ている issue
-
agent-research-recommend agent-review-finding chore
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
jordansmall/spindrift#4821 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:web
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
praetorianer777/GoTome#178 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
oracle/go-oracledb#105 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信