使用帶有angularjs2和Typescript 1.5beta的visual studio代碼時出現問題。無法編譯外部模塊,除非提供'--module'標誌
Error:(3, 1) TS1148: Cannot compile external modules unless the '--module' flag is provided.
Error:(6, 1) TS1205: Decorators are only available when targeting ECMAScript 5 and higher.
我可以用用 TSC -t ES5 -m CommonJS的app.ts.The同樣的問題,在命令行編譯器運行相同的代碼webstorm 10.0.2 occours爲好。
有關'tsconfig.json'看到HTTPS的詳細信息: //github.com/Microsoft/TypeScript/wiki/tsconfig.json – jbandi
在webstorm中,您可以在首選項 - >語言和框架 - > TypeScript – jbandi
上添加命令行選項'--module commonjs',然後添加命令行選項,如「--module commonjs「它顯示錯誤無法啓動編譯器程序 –