-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtsconfig.json
58 lines (57 loc) · 2.67 KB
/
tsconfig.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
// The configuration of tsconfig http://json.schemastore.org/tsconfig
// Instructs the TypeScript compiler how to compile .ts files.
"compilerOptions": {
// Set the JavaScript language version for emitted JavaScript and include compatible library declarations.
"target": "esnext",
// Emit ECMAScript-standard-compliant class fields.
"useDefineForClassFields": true,
// Specify what module code is generated.
// enum: ["CommonJS","AMD","System","UMD","ES6","ES2015","ES2020","ESNext","None","ES2022","Node16","NodeNext"]
"module": "esnext",
// Specify how TypeScript looks up a file from a given module specifier.
"moduleResolution": "node",
// Enable all strict type checking options.
"strict": true,
// Specify what JSX code is generated.
"jsx": "preserve",
// Create source map files for emitted JavaScript files.
"sourceMap": true,
// Enable importing .json files
"resolveJsonModule": true,
// Ensure that each file can be safely transpiled without relying on other imports.
"isolatedModules": true,
// "typeRoots": [
// "./node_modules/@types",
// "./typings"
// ],
// Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility.
"esModuleInterop": true,
// Allow 'import x from y' when a module doesn't have a default export.
"allowSyntheticDefaultImports": true,
// Specify a set of bundled library declaration files that describe the target runtime environment.
"lib": ["esnext", "dom"],
// Skip type checking all .d.ts files.
"skipLibCheck": true,
// Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files.
"allowJs": true,
// Enable error reporting for expressions and declarations with an implied `any` type..
"noImplicitAny": true,
// Generate .d.ts files from TypeScript and JavaScript files in your project.
"declaration": true,
// Specify type package names to be included without being referenced in a source file. vue3 setup 语法糖使用 defineOptions
"types": [
"vite/client",
// "vite-plugin-vue-component-preview/client",
"unplugin-vue-define-options"
],
// Enable constraints that allow a TypeScript project to be used with project references.
// "composite": true,
// Enable experimental support for TC39 stage 2 draft decorators.
"experimentalDecorators": true
},
"include": ["./**/*.vue"],
"exclude": ["./**/dist", "./**/node_modules"],
// Referenced projects. Requires TypeScript version 3.0 or later.
"references": [{ "path": "./tsconfig.node.json" }]
}