-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsconfig.json
More file actions
40 lines (40 loc) · 1.96 KB
/
tsconfig.json
File metadata and controls
40 lines (40 loc) · 1.96 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
{
"compilerOptions": {
"target": "ES6" /* 编译结果使用的版本标准: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
"module": "commonjs" /* 编译结果使用的模块化标准: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
"lib": [ // 指定要包含在编译中的库文件
"ESNext",
"DOM"
] /* 在写ts的时候支持的环境,默认是浏览器环境。如需要支持node,安装@type/node */,
"jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
"sourceMap": true, // 生成相应的 '.map' 文件
"strict": true,
// 启用所有严格类型检查选项
// 在表达式和声明上有隐含的 any类型时报错
// 启用严格的 null 检查
// 当 this 表达式值为 any 类型的时候,生成一个错误
// 以严格模式检查每个模块,并在每个文件里加入 'use strict'
"removeComments": true /* 编译结果把ts的注释移除掉 */,
"esModuleInterop": true /* es6的模块化和非es6的模块化标准互通 */,
"allowSyntheticDefaultImports": true, // 允许从没有设置默认导出的模块中默认导入
"baseUrl": "./", // 用于解析非相对模块名称的基目录
"paths": { // 模块名到基于 baseUrl 的路径映射的列表
"@src/*": [
"./app/renderer/*"
] // webpack 配置别名,但在TS中会报红找不到,所以tslint也需要配置
},
"moduleResolution": "node" // 选择模块解析策略: 'node' (Node.js) or 'classic' (TypeScript pre-1.6)
},
// 设置无需进行编译的文件,支持路径模式匹配
"exclude": [
"dist",
"node_modules"
],
// 设置需要进行编译的文件,支持路径模式匹配
"include": [
"app/**/*.ts",
"app/**/*.tsx",
"app/**/*.d.ts",
"app/renderer/components/Count/index.js"
]
}