Skip to content

target is likely too restrictive #8

@RA80533

Description

@RA80533

The target property in the project tsconfig.json defines ESNext as the minimum ECMAScript version with which the project supports. ESNext is an abstract ECMAScript version with a rolling feature support—it doesn't necessarily exist in any JavaScript engine on its own.

Since target is set to ESNext, TypeScript will not transpile any of the newer features to something usable in current JavaScript engines. To demonstrate the kind of feature support available, take a look at node.green. Almost none of ESNext is supported in any versions of Node.js.

Suggestion

  • Update target to a pinned version of ECMAScript ("target": "ES2018", for example, would be appropriate because it covers all active Node.js versions)
  • Remove the lib property—it's automatically defined based on target

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions