TypeScript Version: 2.0.10
{ "compilerOptions": { "module": "commonjs", "target": "es5", "noImplicitAny": true, "sourceMap": true, "noEmitOnError": true, "strictNullChecks": true, "noUnusedParameters": true }, "exclude": [ "node_modules" ] }
Expected behavior:
Should compile into script.js
Actual behavior:
script.ts(51,7): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
script.ts(55,7): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
Works when you use the command tsc script.ts --t es5