Gus*_*pes 13 typescript tsconfig
如何config.json在我的 Typescript 项目中使用内部?
为清楚起见:
我有一个根/config.json如下:
{
"compilerOptions": {
"module": "commonjs",
"target": "es2017",
"inlineSourceMap": true,
"outDir": "./app/",
"lib": [
"es6"
],
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"moduleResolution": "node",
"baseUrl": "./",
"noImplicitAny": true,
"skipLibCheck": true,
"paths": {
"*": [
"types/*"
]
}
},
"include": [
"./src/**/*.ts"
]
}
Run Code Online (Sandbox Code Playgroud)
我想拥有/innerFolder/config.json以下内容:
{
"extends": "../tsconfig.json",
"compilerOptions": {
"noImplicitReturns": true,
"noUnusedParameters": true,
"noUnusedLocals": true,
"strictNullChecks": true,
}
}
Run Code Online (Sandbox Code Playgroud)
我这样做是因为我想对团队的代码进行重构,但它很大,我不想一次更改我的所有文件。
我想逐个文件夹执行此操作,并使用更改“锁定”文件夹。
根据文档,编译器会查找 parent tsconfig.json,但不会查找特定的tsconfig.json.
有没有办法做到这一点?
| 归档时间: |
|
| 查看次数: |
4120 次 |
| 最近记录: |