Successfully implemented the AngularJS 2.0 5 Minute Quickstart in my IntelliJ IDEA 14.1.4
following a helpful Stackoverflow Answer on AngularJS 2.0 TypeScript Intellij idea (or webstorm) - ES6 import syntax.
However, it seems to focus on compiling TypeScript
to EcmaScript 5
.
Curious if it's possible to compile AngularJS 2.0 Typescript
to EcmaScript 6
.
Issue 1: When I change the compiler to target ES6
...
https://i.sstatic.net/YEcjw.png
An error occurs with the TypeScript
compiler:
Error: TS1204: Cannot compile modules into 'commonjs', 'amd', 'system', or 'umd'
when targeting 'ES6' or higher.
Solving it involves removing the --module "amd"
option from the compiler.
Leads to the question: without amd, what module format does ES6
use?
Issue 2:
After tweaking the compiler options as follows:
https://i.sstatic.net/TDGwp.png
Errors start appearing regarding:
Error TS2300: Duplicate identifier 'Promise'
https://i.sstatic.net/OJOFl.png
Has anyone encountered this issue before? Seems related to the AngularJS 2.0 Quickstart
and global installation of ES-6 Promise, but struggling to find a solution.
Your assistance is greatly appreciated.