自从我升级到Typescript 2.0后,tsc编译器没有为我的代码生成定义文件。这是我的tsconfig.json
{
"compilerOptions": {
"target": "es5",
"noImplicitAny": false,
"removeComments": true,
"sourceMap": true,
"module": "commonjs",
"experimentalDecorators": true,
"declaration": true,
"declarationDir": "./dist",
"lib": ["es2015", "dom"],
"types": [
"node"
]
},
"include": [
"src/**/*.ts",
"node_modules/@types/**/*.d.ts"
],
"exclude": [
"src/**/*-spec.ts",
"index.d.ts",
"dist/",
"build/",
"node_modules/shn-dropdown/**/*.d.ts",
"node_modules/**/build/"
],
"version": "2.0."
}
使用TS 1.8.9,我的.d.ts文件生成为dist/src/
并镜像了我的src/
目录的文件结构。据我所知,我的配置文件对spec和CLI documentation
答案 0 :(得分:0)
我仍然不知道造成这个问题的原因。但升级到TS 2.1.0后它并没有再次发生。