1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

VSCodeで拡張子jsファイルの'Type aliases can be used only in a .ts file' エラーを回避する

Posted at

VSCodeで、拡張子jsのファイルにてTypeを使うと以下のエラーが起きます。

'Type aliases can be used only in a .ts file' error

ググったら以下のページを発見。
'Type aliases can be used only in a .ts file' error popping up in Flow enabled files
https://github.com/Microsoft/vscode/issues/15171

VSCodeのsetting.jsonに以下を追加することでエラーをとりあえず回避できました。

"javascript.validate.enable": false

1
1
0

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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?