I can get the AngularJS 2.0 5 Minute Quickstart working in my IntelliJ IDEA 14.1.4
following this Stackoverflow Answer regarding AngularJS 2.0 TypeScript Intellij idea (or webstorm) - ES6 import syntax.
However, this appears to be targeting compilation of TypeScript
to EcmaScript 5
.
I wanted to see if I could get AngularJS 2.0 Typescript
to compile to EcmaScript 6
.
Issue 1: When I change the TypeScript
compiler to target ES6
...
I start getting a TypeScript
compiler error:
Error: TS1204: Cannot compile modules into 'commonjs', 'amd', 'system', or 'umd'
when targeting 'ES6' or higher.
I can get around it by removing the --module "amd"
TypeScript
compiler option.
This does beg the question: without specifying amd, what sort of module format is ES6
using?
Issue 2:
After modifying the TypeScript
compiler options so they appear as follows:
I start getting errors regarding:
Error TS2300: Duplicate identifier 'Promise'
Has anyone seen this before? I suspect it has something to do with the AngularJS 2.0 Quickstart
specifying ES-6 Promise and it being installed globally, but have not been able to figure out how to resolve it.
Thank you very much in advance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…