Skip to content

Remove older emit support over timeΒ #47573

Closed
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Suggestion

πŸ” Search Terms

remove emit target es3 es5

βœ… Viability 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, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion

Following #47572, once the default target has been raised to a new value, can TypeScript remove emit support for the no-longer-default old version in either that same major version or the next one?

Using the example schedule in that issue:

  • Remove es3 emit support for 5.0, making es5 the lowest supported emit target
  • Remove es5 emit support for 6.0, making es2015 the lowest supported emit target
  • ...and so on

πŸ“ƒ Motivating Example

Supporting emit to low emit targets such as ES3/5 worsens:

πŸ’» Use Cases

It'd be nice to have a leaner TypeScript without the cost of supporting emit for syntax compatibility the vast majority of runtimes no longer need.

Metadata

Metadata

Assignees

No one assigned

    Labels

    In DiscussionNot yet reached consensusSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions