Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add es3.d.ts #28372

Closed
wants to merge 12 commits into from
Closed

Add es3.d.ts #28372

wants to merge 12 commits into from

Conversation

saschanaz
Copy link
Contributor

@saschanaz saschanaz commented Nov 6, 2018

Revives #16077

Fixes #2410
Fixes #15978

Intentionally included only NaN in es3.d.ts to initially generate minimal baseline changes.

src/lib/es5.d.ts Outdated Show resolved Hide resolved
@ericdrobinson
Copy link

Am I missing something or is the current setup one that would have an es3.d.ts-only project have nothing beyond NaN defined? Shouldn't the es3.d.ts file contain most of what's included in the current es5.d.ts?

Unless I'm missing something, the current es3.d.ts looks... pretty useless, no?

@saschanaz
Copy link
Contributor Author

saschanaz commented Nov 14, 2018

@ericdrobinson The OP says:

Intentionally included only NaN in es3.d.ts to initially generate minimal baseline changes.

Moving all in once is doable but generates tons of baseline changes, which will make this PR hard to review. I want to get some review about code changes first and then move remaining types.

@RyanCavanaugh RyanCavanaugh self-assigned this Jan 25, 2019
@RyanCavanaugh RyanCavanaugh added this to 𝚜𝚘𝚘𝚗 ™ in Design Meeting Docket Jan 25, 2019
@RyanCavanaugh RyanCavanaugh moved this from 𝚜𝚘𝚘𝚗 ™ to This Week in Design Meeting Docket Feb 1, 2019
@RyanCavanaugh RyanCavanaugh removed this from This Week in Design Meeting Docket Feb 15, 2019
@RyanCavanaugh
Copy link
Member

In the intervening years since #2410 was logged, pretty much all the ES3 targets have died out (even the use cases identified most recently don't even really count as a true ES3 target).

Something we should have realized four years ago was that this would be a breaking change! Anyone targeting ES3 but using ES5 APIs (which is an entirely reasonable state to find yourself in if your actual runtime is ES5 and you're not using getters/setters, or if you're using polyfills) is going to be broken if we merge this and make target: ES3 align to lib: ES3.

So given the relative lack of remaining use cases for this, and the fact that to preserve back compat we'd have to make this an opt-in that you can effectively already achieve today with noLib, we're going to have to pass on this. Sorry for not identifying that problem earlier - we definitely should have.

@attilah
Copy link

attilah commented Jan 30, 2023

@RyanCavanaugh FYI Salesforce Marketing Cloud is using an ES3 compatible language set for (Jint is their JS runtime) their SSJS language.

@ericdrobinson
Copy link

@attilah You might want to mention that over on #51909 which is explicitly about the ES3 target deprecation coming in TypeScript 5.0 (removal planned for 5.5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@lib: ES6 on fourslash test case breaks tests Create ES3 specific lib.d.ts
4 participants