tsconfig.json
文件是 JSON 格式的文件。在 tsconfig.json
文件中,可以指定各种选项来告诉编译器如何编译当前项目。目录中存在 tsconfig.json
文件表明该目录是 TypeScript 项目的根目录。下面是一个示例 tsconfig.json 文件的内容:
{
"compilerOptions": {
"declaration": true,
"emitDecoratorMetadata": false,
"experimentalDecorators": false,
"module": "none",
"moduleResolution": "node"
"removeComments": true,
"sourceMap": true
},
"files": [
"main.ts",
"othermodule.ts"
]
}