-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
Search Terms
defaults, ecmascript
Suggestion
The latest available typescript typescript@3.7.2
produces a bunch of unnecessary errors by targeting a very old version of JavaScript:
Error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
Typescript should update the default language version to something more reasonable.
Use Cases
A user install typescript
. They compile a project using tsc
which will fail in most cases. The users discovers that TypeScript targets a 21 year old version of JavaScript by default. They update their compiler options to support and 11 year old version of JavaScript at minimum.
Examples
tsc somefile.ts
working without errors.
Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.
ExE-Boss, Nicuz, mikemaccana, nicolashenry and Sandagomievandrocoan and achrinza
Metadata
Metadata
Assignees
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScriptAn idea for TypeScript