-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Use the wildcard type for signature erasure #41067
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
Use the wildcard type for signature erasure #41067
Conversation
@typescript-bot test this |
Heya @weswigham, I've started to run the parallelized Definitely Typed test suite on this PR at cdb4e6e. You can monitor the build here. |
Heya @weswigham, I've started to run the extended test suite on this PR at cdb4e6e. You can monitor the build here. |
Heya @weswigham, I've started to run the parallelized community code test suite on this PR at cdb4e6e. You can monitor the build here. |
Heya @weswigham, I've started to run the perf test suite on this PR at cdb4e6e. You can monitor the build here. Update: The results are in! |
@weswigham Here they are:Comparison Report - master..41067
System
Hosts
Scenarios
|
The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master. |
@weswigham do the baselines look good for this change? |
DT was clean, rwc was mostly clean (just an elaboration change when relating jquery promise to normal promise in a case where there was already an error), user baselines were.... probably clean? There's some noise there, but I think it's unrelated. Perf looks fine. |
Closing due to closing the upstream bug |
Fixes #23352's first issue. We used
any
as a "type erasure placeholder" so that we could assume it would allow all assignability. It does, not, however, allow assignability tonever
(which is the cause of the issue). ThewildcardType
(anany
variant) we introduced for inference awhile back does admit assignability tonever
, and so fulfills the erasure duty better.