-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Backing out Promise
's resolve
changes
#41497
Comments
(There's also the option of moving the change behind a flag, and inverting the default of the flag in the future) |
It's an option, but it's unclear how we would flag this since it's primarily a |
I was discussing this with @DanielRosenwasser offline, but 4.1 doesn't introduce the idea of trailing |
We have |
In TypeScript 4.1, we've worked on two changes:
resolve
's parameter non-optional: Remove optionality for Promise resolve callback #39817void
parameters optional in assignability: Treat trailing 'void' as optional for assignability #40231The thing that we've seen a lot of is that most large codebases are impacted in some capacity. At Google, 0.26% of "libraries" were impacted by the non-optionality of
resolve
, and it's a legitimate concern. We've also seen breaks similar things from projects within Microsoft, though we don't have the same sort of holistic view of codebases internally.. the change is relatively mechanical, but it is fairly breaky, and it is fairly common according to the report at #41445.It is fairly last-minute, but I think there are a few questions which are worth asking:
void
parameters to be optional and then makingresolve
optional?The text was updated successfully, but these errors were encountered: