-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
In DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
Search Terms
tsc --init default target ES5 ES6
Suggestion
When running tsc --init
, let the tsconfig has es6
or higher target.
Use Cases
It's not common to have to use es5 nowadays
Examples
Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript codeThis wouldn't change the runtime behavior of existing JavaScript codeThis could be implemented without emitting different JS based on the types of the expressionsThis 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.To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
TimvdLippe and nicosemp
Metadata
Metadata
Assignees
Labels
In DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
lloydjatkinson commentedon Jun 1, 2023
Any plans for the team to implement this change? It's absurd
tsc -init
defaults to"target": "es2016"
and the rest still.RyanCavanaugh commentedon Jun 1, 2023
Can you clarify what's absurd? Just calling something names doesn't help us understand what's bad about it.
Axel-Jalonen commentedon Jun 21, 2024
As an example: "Typescript includes the
__awaiter
helper becauseasync
/await
is not a part of the ES6/ES2015 specification."Async
/await
was first included in the ES2017 specification.In 2024, and indeed 2023, we should not default to using helpers, or solutions like this, when native functionality is included with every modern browser. Using modern standards and not old fixes is good for readability, correctness, robustness of code, etc.
https://stackoverflow.com/a/47995659
Jack-Works commentedon Apr 14, 2025
This is shipped since I cannot recall when