-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
DeclinedThe issue was declined as something which matches the TypeScript visionThe issue was declined as something which matches the TypeScript visionSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
In TypeScript 4.1, we've worked on two changes:
- Making
resolve
's parameter non-optional: Remove optionality for Promise resolve callback #39817 - Making
void
parameters optional in assignability: Treat trailing 'void' as optional for assignability #40231
The 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:
- Do these breaks warrant a 2-step release process of allowing
void
parameters to be optional and then makingresolve
optional? - If so, does this need a back-out?
- Is a back-out even more dangerous at this point?
- Will we realistically put the change back in for 4.2?
brainkimbrainkim
Metadata
Metadata
Assignees
Labels
DeclinedThe issue was declined as something which matches the TypeScript visionThe issue was declined as something which matches the TypeScript visionSuggestionAn idea for TypeScriptAn idea for TypeScript