Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

target is likely too restrictive #8

Open
RA80533 opened this issue Mar 21, 2021 · 0 comments
Open

target is likely too restrictive #8

RA80533 opened this issue Mar 21, 2021 · 0 comments

Comments

@RA80533
Copy link

RA80533 commented Mar 21, 2021

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant