Problem while using visual studio code with angularjs2 and Typescript 1.5beta.
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.
I can run the same code using the commandline compiler using tsc -t es5 -m commonjs app.ts.The same problem occours with webstorm 10.0.2 as well.
This is how I solved it in Webstorm/IntelliJ
File>Settings>Languages & Frameworks > TypeScript
Command Line options:
-m amd -t ES5