我用 Webstorm 7 开发 TypeScript 已经有一段时间了,今天我收到这条错误消息,它阻止了 Webstorm 转换 ts 文件。有没有人见过这个问题?顺便说一句,我在Mac上。
/usr/local/lib/node_modules/typescript/bin/tsc --sourcemap MyClass.ts --module AMD --target ES5
/usr/local/lib/node_modules/typescript/bin/tsc.js:44963
if (decl.kind == 32 /* DynamicModule */) {
^
TypeError: Cannot read property 'kind' of undefined
at SemanticInfoChain.findDecls (/usr/local/lib/node_modules/typescript/bin/tsc.js:44963:33)
at SemanticInfoChain.findSymbol (/usr/local/lib/node_modules/typescript/bin/tsc.js:45040:30)
at /usr/local/lib/node_modules/typescript/bin/tsc.js:37104:52
at PullTypeResolver.findTypeSymbolForDynamicModule (/usr/local/lib/node_modules/typescript/bin/tsc.js:36426:30)
at PullTypeResolver.resolveImportDeclaration (/usr/local/lib/node_modules/typescript/bin/tsc.js:37103:36)
at PullTypeResolver.resolveAST (/usr/local/lib/node_modules/typescript/bin/tsc.js:39157:33)
at PullTypeResolver.resolveList (/usr/local/lib/node_modules/typescript/bin/tsc.js:38618:26)
at PullTypeResolver.resolveAST (/usr/local/lib/node_modules/typescript/bin/tsc.js:39132:33)
at PullTypeResolver.resolveModuleDeclaration (/usr/local/lib/node_modules/typescript/bin/tsc.js:36610:30)
at PullTypeResolver.resolveAST (/usr/local/lib/node_modules/typescript/bin/tsc.js:39138:33)