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
The
targetproperty 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
targetis 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
targetto a pinned version of ECMAScript ("target": "ES2018", for example, would be appropriate because it covers all active Node.js versions)libproperty—it's automatically defined based ontarget