-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtsconfig.json
88 lines (85 loc) · 2.61 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
//最外層
{
//"extends": "../src/frontend/tsconfig.json",
"compilerOptions": {
/* 将多个TypeScript源文件编译成一个单独的JavaScript文件。 */
//"composite": true,
"declaration": false,
"types": [
"node", "jest"
,"./global.d.ts"
],
"allowJs": false,
"target": "ESNext",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"skipLibCheck": true,
"sourceMap": true,
"inlineSources": true,
/* Bundler mode */
//"moduleResolution": "bundler",Option 'bundler' can only be used when 'module' is set to 'es2015' or later.
//"allowImportingTsExtensions": true,
"resolveJsonModule": true,
//"isolatedModules": true, //选项“outFile”不能与选项“isolatedModules”同时指定。ts
"noEmit": false, //不生成編譯後ᵗ文件
"noEmitOnError": false, //有錯旹不生成編譯ᵗ文件
"jsx": "preserve",
/* Linting */
"strict": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"noFallthroughCasesInSwitch": true,
"strictPropertyInitialization": false,
"noImplicitAny": false, //不准 隱式ᵗ any
"moduleResolution": "Node", //模塊解析策略
"esModuleInterop": true, //用import導入commonJs模塊
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
//"allowImportingTsExtensions": true,
//"outDir": "./backend-out",
"outDir": "./out",
//"outFile": "bundle.js",
//"outDir": ".",
"rootDir": "./src",//限定 TypeScript 编译器的搜索范围。若不設潙./src則${out}下還會有一個src目錄
"baseUrl": "./src",//用于解析模块导入路径的基础路径
"paths": {
"@root/*": ["../*"],
//"*":["src/shared/*"],
"@shared/*": ["shared/*"], //不能不寫/*
"@frontend/*": ["frontend/*"],
"@backend/*": ["backend/*"],
}
},
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
//"include": ["frontend/**/*.ts", "frontend/**/*.d.ts", "frontend/**/*.tsx", "frontend/**/*.vue"],
"exclude": [
//vscode重命名,文件改名 自動更新導入 等 有時不及此、故不用exclude
//"src/frontend/*"
],
//include下之文件皆當在${rootDir}/*下
"include": [
"src/**/*.ts"
, "src/**/*.d.ts"
, "src/**/*.tsx"
, "src/**/*.vue"
, "config.ts"
],
"ts-node": {
// Tell ts-node CLI to install the --loader automatically, explained below
"esm": true
// Do not forget to `npm i -D tsconfig-paths`
,"require": ["tsconfig-paths/register"]
}
// deepkit io runtime type
,"reflection": true
//"include": ["/*.ts"],
// "include": [
// "backend/**/*.ts"
// ],
// "exclude": [
// "node_modules",
// "**/*.spec.ts"
// ]
}