Rafe
Rafe

Reputation: 9275

What does compilerOptions.target specify in tsconfig.json?

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?

Upvotes: 8

Views: 4692

Answers (1)

Related Questions