-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtsconfig.json
More file actions
67 lines (67 loc) · 1.99 KB
/
tsconfig.json
File metadata and controls
67 lines (67 loc) · 1.99 KB
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
59
60
61
62
63
64
65
66
67
{
// 编译选项
"compilerOptions": {
// 输出目录
// "outDir": "./output",
// 是否包含可以用于 debug 的 sourceMap
"sourceMap": true,
// 以严格模式解析
"strict": true,
// 采用的模块系统
"module": "esnext",
// 如何处理模块
"moduleResolution": "node",
// 编译输出目标 ES 版本
"target": "esnext",
// 允许从没有设置默认导出的模块中默认导入
"allowSyntheticDefaultImports": true,
// Emit '__importStar' and '__importDefault' helpers for runtime babel ecosystem compatibility and enable '--allowSyntheticDefaultImports' for typesystem compatibility. Requires TypeScript version 2.7 or later.
"esModuleInterop": true,
// 将每个文件作为单独的模块
"isolatedModules": false,
// 启用装饰器
"experimentalDecorators": true,
// 启用设计类型元数据(用于反射)
"emitDecoratorMetadata": true,
// 在表达式和声明上有隐含的any类型时报错
"noImplicitAny": false,
// 不是函数的所有返回路径都有返回值时报错。
"noImplicitReturns": true,
// 从 tslib 导入外部帮助库: 比如__extends,__rest等
"importHelpers": true,
// 编译过程中打印文件名
"listFiles": true,
// 移除注释
"removeComments": true,
"suppressImplicitAnyIndexErrors": true,
// 允许编译javascript文件
"allowJs": true,
// 解析非相对模块名的基准目录
"baseUrl": ".",
// 指定特殊模块的路径
"paths": {
// "jquery": [
// "node_modules/jquery/dist/jquery"
// ]
"@/*": ["src/*"],
},
// 编译过程中需要引入的库文件的列表
// "lib": [
// "dom",
// "es2015",
// "es2015.promise"
// ]
// 让typescript支持JSX
"jsx": "preserve"
},
"include": [
"node_modules/@types",
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
],
"exclude": [
"node_modules",
"dist"
],
}