Skip to content

Commit 32c0a6a

Browse files
Note that verbatimModuleSyntax meets the suggested criteria for isolatedModules (#2592)
* Note that verbatimModuleSyntax meets the suggested criteria for `isolatedModules` See also vuejs/create-vue#401 * Update src/guide/typescript/overview.md --------- Co-authored-by: Natalia Tepluhina <[email protected]>
1 parent 6f67576 commit 32c0a6a

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 @@ Projects scaffolded via `create-vue` include pre-configured `tsconfig.json`. The
4242

4343
When configuring `tsconfig.json` manually, some notable options include:
4444

45-
- [`compilerOptions.isolatedModules`](https://www.typescriptlang.org/tsconfig#isolatedModules) is set to `true` because Vite uses [esbuild](https://esbuild.github.io/) for transpiling TypeScript and is subject to single-file transpile limitations.
45+
- [`compilerOptions.isolatedModules`](https://www.typescriptlang.org/tsconfig#isolatedModules) is set to `true` because Vite uses [esbuild](https://esbuild.github.io/) for transpiling TypeScript and is subject to single-file transpile limitations. [`compilerOptions.verbatimModuleSyntax`](https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax) is [a superset of `isolatedModules`](https://github.com/microsoft/TypeScript/issues/53601) and is a good choice, too - it's what `[@vue/tsconfig](https://github.com/vuejs/tsconfig)` uses.
4646

4747
- If you're using Options API, you need to set [`compilerOptions.strict`](https://www.typescriptlang.org/tsconfig#strict) to `true` (or at least enable [`compilerOptions.noImplicitThis`](https://www.typescriptlang.org/tsconfig#noImplicitThis), which is a part of the `strict` flag) to leverage type checking of `this` in component options. Otherwise `this` will be treated as `any`.
4848

0 commit comments

Comments
 (0)