Skip to content

Commit

Permalink
fix: tsconfigをViteの推奨する設定に合わせる (#2162)
Browse files Browse the repository at this point in the history
  • Loading branch information
sabonerune authored Jul 7, 2024
1 parent cdb31d9 commit 5ef5d65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 3 additions & 5 deletions src/store/vuex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,18 @@ export class Store<
> extends BaseStore<S> {
constructor(options: StoreOptions<S, G, A, M>) {
super(options as OriginalStoreOptions<S>);
// @ts-expect-error Storeの型を書き換えている影響で未初期化として判定される
this.actions = dotNotationDispatchProxy(this.dispatch.bind(this));
this.mutations = dotNotationCommitProxy(
// @ts-expect-error Storeの型を書き換えている影響で未初期化として判定される
this.commit.bind(this) as Commit<M>,
);
}

readonly getters!: G;
declare readonly getters: G;

// @ts-expect-error Storeの型を非互換な型で書き換えているためエラー
dispatch: Dispatch<A>;
declare dispatch: Dispatch<A>;
// @ts-expect-error Storeの型を非互換な型で書き換えているためエラー
commit: Commit<M>;
declare commit: Commit<M>;
/**
* ドット記法用のActionを直接呼べる。エラーになる場合はdispatchを使う。
* 詳細 https://github.com/VOICEVOX/voicevox/issues/2088
Expand Down
6 changes: 4 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
{
"compilerOptions": {
"target": "ES6",
"target": "esnext",
"module": "esnext",
"strict": true,
"jsx": "preserve",
"jsxImportSource": "vue",
"importHelpers": true,
"moduleResolution": "bundler",
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"isolatedModules": true,
"resolveJsonModule": true,
"sourceMap": true,
"baseUrl": ".",
"types": ["vitest/globals"],
"paths": {
"@/*": ["src/*"]
},
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
"lib": ["esnext", "dom", "dom.iterable"]
},
"include": [
"src/**/*.ts",
Expand Down

0 comments on commit 5ef5d65

Please sign in to comment.