forked from mitojs/mitojs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtsconfig.json
55 lines (55 loc) · 2.08 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
{
"compilerOptions": {
"jsx": "react-jsx",
"allowUnreachableCode": false, // 报告执行不到的代码错误
"allowUnusedLabels": false, // 不报告未使用的标签错误
"alwaysStrict": false, // 以严格模式解析并为每个源文件生成 "use strict"语句
"strictNullChecks": false, // 当尝试在可能为null或undefined的变量上访问属性时,报告错误 (一开始没开,现在开启导致很多错误,下次统一修复)
"baseUrl": ".", // 工作根目录,会影响vscode import生成的路径
"preserveConstEnums": false, // true 使用 const enum 产生内联成员,会导致没有引入的const enum也会生成代码
"isolatedModules": false, // 将模块视为独立的,不会被其他模块所引用
"experimentalDecorators": true, // 启用实验性的ES装饰器
"moduleResolution": "Node", // 引入package.json不会报红
"sourceMap": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"pretty": true,
"noImplicitAny": false, // 是否默认禁用 any
"removeComments": true, // 是否移除注释
"forceConsistentCasingInFileNames": true, //禁止对同一个文件的不一致的引用。
"paths": { // 指定模块的路径,和baseUrl有关联
"@mitojs/*": [
"packages/*/src"
],
"@/test/*": [
"test/*"
]
},
"types": [
"node",
"jest",
"wechat-miniprogram",
"puppeteer"
],
"target": "ES5", // 编译成什么版本
"module": "CommonJS", // 当前代码语法
// "outDir": "./dist/", // 输出目录
"declaration": true, // 是否自动创建类型声明文件
// "declarationMap": true,
// "declarationDir": "./dist/packages/", // 类型声明文件的输出目录
"typeRoots": [ // 指定某个文件夹的声明文件
"node_modules/@types"
],
"allowJs": false, // 不允许编译javascript文件。
"lib": [ // 编译过程中需要引入的库文件的列表
"es6",
"dom"
]
},
"include": [
"packages",
"mito",
"test",
"examples"
],
}