我在路径中有我的typescript源代码:
src/game/tstsconfig.json位于:
src/game/ts/tsconfig.json中的类型和类型:
src/game/ts/typings我可以通过以下方式很好地运行tsc:
tsc --p src/game/ts但是我使用以下命令得到了未定义的类型错误(对于在src/game/ts/typings/**/*.d.ts文件中声明的类型):
browserify --debug src/game/ts/main.ts -p [ tsify --p src/game/ts ] > public/game/js/bundle.js为什么tsc不给出定义呢?我的tsconfig.json包含:
"include": [
"main.ts", "typings/**/*.d.ts"
],发布于 2016-08-09 08:46:28
要包含类型,您只需添加typings/index.d.ts文件,因为它引用了typings目录中的其他.d.ts文件。因此glob不是必需的,您可以简单地使用files选项:
"files": [
"main.ts",
"typings/index.d.ts"
]发布于 2016-07-03 11:45:04
"include"不支持globs。请使用filesGlob选项
更多
此选项是最近才添加的。使用nightly:https://basarat.gitbooks.io/typescript/content/docs/getting-started.html#typescript-version
https://stackoverflow.com/questions/38165860
复制相似问题