2
0

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.

デコレーターを使おうとしたら怒られた

Last updated at Posted at 2021-03-02

背景

vuex-module-decoratorsを使ってストアを宣言したら、
クラス名にて怒られた

import { Module, VuexModule, Mutation, Action } from 'vuex-module-decorators';

@Module
export default class AuthStore extends VuexModule {
}

デコレーターの実験的なサポートは将来のリリースで変更になる可能性がある機能です。'experimentalDecorators' オプションを設定してこの警告を削除します

対処

VSCodeの設定にてExperimental Decoratorsの設定を変更。

  1. 基本設定を開く
  2. 設定を開く
  3. 検索窓にexperimentalと入力
  4. JS/TS › Implicit Project Config: Experimental Decoratorsの設定にチェックを入れる

参考記事

2
0
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
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?