Skip to content

Commit e8fed27

Browse files
authored
Note that verbatimModuleSyntax meets the suggested criteria for isolatedModules (#1705)
1 parent 584b56a commit e8fed27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/guide/typescript/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Vite ベースのセットアップでは、開発サーバーとそのバンド
4242

4343
`tsconfig.json` を手動で構成する場合、いくつかの注目すべきオプションは以下の通りです:
4444

45-
- Vite は TypeScript のトランスパイルに [esbuild](https://esbuild.github.io/) を使用しており、単一ファイルのトランスパイル制限に従うので、[`compilerOptions.isolatedModules`](https://www.typescriptlang.org/tsconfig#isolatedModules)`true` に設定してください。
45+
- Vite は TypeScript のトランスパイルに [esbuild](https://esbuild.github.io/) を使用しており、単一ファイルのトランスパイル制限に従うので、[`compilerOptions.isolatedModules`](https://www.typescriptlang.org/tsconfig#isolatedModules)`true` に設定してください。[`compilerOptions.verbatimModuleSyntax`](https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax)[`isolatedModules` のスーパーセット](https://github.com/microsoft/TypeScript/issues/53601)であり、これも良い選択です。これは [`@vue/tsconfig`](https://github.com/vuejs/tsconfig) で使用されています。
4646

4747
- Options API を使用する場合は、コンポーネントオプションにおける this の型チェックを活用するために [`compilerOptions.strict`](https://www.typescriptlang.org/tsconfig#strict)`true` に設定 (もしくは少なくとも strict フラグの一部である [`compilerOptions.noImplicitThis`](https://www.typescriptlang.org/tsconfig#noImplicitThis)`true` に設定) する必要があります。そうでないと、this は常に any 型として扱われます。
4848

0 commit comments

Comments
 (0)