Skip to content

Build target not working from tsconfig.json #12645

@clementohNZ

Description

@clementohNZ

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions