LoginSignup
1
2

More than 5 years have passed since last update.

VS Codeでデフォルトじゃないバージョンのtypescriptを使う方法

Posted at

vs codeで開いたプロジェクトにtypescript2.0が含まれてるとvs codeは2.0を使いますか?って聞いてくれる
間違って二度と表示しないを選んじゃって赤線だらけになった(1.8?で使えない記法が入ってた)ので、設定を戻そうとしたけどどこで戻すかわからなくなったのでメモ

  • ユーザ設定もしくはワークスペース設定のsettings.jsonを開く
  • "typescript.tssdk": "<利用するバージョンのtypescriptのlibディレクトリのパス>" を追記
  • 再起動

で意図したバージョンで扱ってくれるようになりました
https://code.visualstudio.com/docs/languages/typescript#_using-newer-typescript-versions
ちゃんとドキュメントを読みましょう

1
2
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2