LoginSignup
28
19

More than 5 years have passed since last update.

VSCodeとVetur(TypeScript)でexperimentalDecoratorsの警告が消えない

Last updated at Posted at 2019-01-31

色々やってみた結果

解決できませんでした

2019/02/16
解決しました!

概要

VSCode + VeturでVue.jsの開発。
experimentalDecoratorsをtrueにしているのに以下のエラーが消えない。

Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.

スクショ

image.png

やったこと

tsconfig.json の experimentalDecorators をtrue

tsconfig.json
{
  "compilerOptions": {
    "experimentalDecorators": true,
    "allowJs": true,
  }
}

だめ

setting の Javascript › Implicit Project Config: Experimental Decorators を true

image.png
だめ

jsconfig.jsonを置いてみる

To fix it, please try creating a jsconfig.json file at the root of your project with the contents:

jsconfig.json
{
  "compilerOptions": {
      "experimentalDecorators": true
  }
}

だめ

結論

コンパイルが通らないとかそういうことはないので問題ないっちゃないんですが、うっとおしい。
Veturのバグですかね。。。

諦めてVueはAtomか何かで開発するか

追記 2019/02/16

解決しました!
ワークスペースでプロジェクトのフォルダを追加していたのですが、
これをファイル -> 開くでプロジェクトのフォルダを直接開いたらエラーが出なくなりました。

@rema424 さん、ありがとうございました!

28
19
7

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
28
19