Skip to content

Remove older emit support over time #47573

New issue

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

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

Already on GitHub? # to your account

Closed
5 tasks done
JoshuaKGoldberg opened this issue Jan 24, 2022 · 1 comment
Closed
5 tasks done

Remove older emit support over time #47573

JoshuaKGoldberg opened this issue Jan 24, 2022 · 1 comment
Labels
In Discussion Not yet reached consensus Suggestion An idea for TypeScript

Comments

@JoshuaKGoldberg
Copy link
Contributor

JoshuaKGoldberg commented Jan 24, 2022

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.

@RyanCavanaugh RyanCavanaugh added In Discussion Not yet reached consensus Suggestion An idea for TypeScript labels Jan 24, 2022
@RyanCavanaugh
Copy link
Member

We removed ES3 support in 5.0. ES5 for 6.0 is certainly a possibility.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
In Discussion Not yet reached consensus Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants