@abdo.zakk/tsconfig 中文文档教程
tsconfig
Install
$ npm install --save-dev @knawat/tsconfig
Usage
tsconfig.json
{
"extends": "@knawat/tsconfig",
"compilerOptions": {
"outDir": "dist"
}
}
当您的目标是更高版本时Node.js,检查相关的 ECMAScript 版本并将其添加为 target
:
{
"extends": "@knawat/tsconfig",
"compilerOptions": {
"outDir": "dist",
"target": "ES2021"
}
}
tsconfig
Shared TypeScript config
Install
$ npm install --save-dev @knawat/tsconfig
Usage
tsconfig.json
{
"extends": "@knawat/tsconfig",
"compilerOptions": {
"outDir": "dist"
}
}
When you are targeting a higher version of Node.js, check the relevant ECMAScript version and add it as target
:
{
"extends": "@knawat/tsconfig",
"compilerOptions": {
"outDir": "dist",
"target": "ES2021"
}
}