-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Defer conditional types with multi-element tuple types in extends
clause
#52091
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
Conversation
@typescript-bot test this |
Heya @ahejlsberg, I've started to run the extended test suite on this PR at e9f81ce. You can monitor the build here. |
Heya @ahejlsberg, I've started to run the diff-based user code test suite on this PR at e9f81ce. You can monitor the build here. Update: The results are in! |
Heya @ahejlsberg, I've started to run the abridged perf test suite on this PR at e9f81ce. You can monitor the build here. Update: The results are in! |
Heya @ahejlsberg, I've started to run the diff-based top-repos suite on this PR at e9f81ce. You can monitor the build here. |
Heya @ahejlsberg, I've started to run the parallelized Definitely Typed test suite on this PR at e9f81ce. You can monitor the build here. |
@ahejlsberg Here are the results of running the user test suite comparing Everything looks good! |
Heya @ahejlsberg, I've run the RWC suite on this PR - assuming you're on the TS core team, you can view the resulting diff here. |
@ahejlsberg Here they are:Comparison Report - main..52091
System
Hosts
Scenarios
Developer Information: |
… types as of TS4.9, conditional types are only deferred for single-element tuples, not multi-element ones. this should be fixed in microsoft/TypeScript#52091, slated for the TS5.0 milestone. until then, however, the implementations of `MutuallyAssignable`, `And`, and `Xor` can be assumed to be bugged. this commit fixes them to properly defer types. `Or` was also like this but fixed in earlier commit 0cd75d4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to think of a way to expand this to cover, eg {x: X} extends {x: Y}
and similar ilk, right?
@weswigham Would be nice to do so, but requires more thinking about permissive/restrictive instantiations and/or some sort of "possibly assignable to" relation. I'm chewing on that, but nothing concrete yet. |
Fixes #52068.