So as of mid-2016 just about all the Angular2 TypeScript tutorials and examples use "target": "es5"
in the compilerOptions
section of the tsconfig.json
file.
I also see people saying that setting "target": "es6"
makes a lot of their errors/problems go away.
{
"compilerOptions": {
"target": "es6",
...
}
}
But what exactly is this specifying? Is this telling the TypeScript compiler what version of ECMAScript to generate?
Yes, it sets the target version to ES6. Check the following out:
https://www.typescriptlang.org/docs/handbook/tsconfig-json.html https://www.typescriptlang.org/docs/handbook/compiler-options.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With