-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Make special intersections order-independent #52782
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
Make special intersections order-independent #52782
Conversation
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
@Andarist can you open a bug to explain the expected and actual behaviour (and the 4.7 behaviour as well)? |
@typescript-bot test this |
Heya @jakebailey, I've started to run the diff-based top-repos suite on this PR at 864272c. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the diff-based user code test suite on this PR at 864272c. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the parallelized Definitely Typed test suite on this PR at 864272c. You can monitor the build here. |
Heya @jakebailey, I've started to run the perf test suite on this PR at 864272c. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the extended test suite on this PR at 864272c. You can monitor the build here. |
The TypeScript team hasn't accepted the linked issue #53043. If you can get it accepted, this PR will have a better chance of being reviewed. |
@jakebailey Here they are:
CompilerComparison Report - main..52782
System
Hosts
Scenarios
TSServerComparison Report - main..52782
System
Hosts
Scenarios
StartupComparison Report - main..52782
System
Hosts
Scenarios
Developer Information: |
@jakebailey Here are the results of running the top-repos suite comparing Everything looks good! |
@jakebailey Here are the results of running the user test suite comparing Everything looks good! |
Seems like everything is clean, including DT. |
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.
isStringAndEmptyAnonymousObjectIntersection
in services/utilities.ts
needs a corresponding update.
@andrewbranch done |
I understand that those special intersections are, well, special - they are a carveout in the logic and don't quite adhere to The Rules. So if you feel that it's unnecessary then feel free to just close this PR.
That being said... this is a regression from #49119 and this worked OK in TS 4.7 (TS 4.7 playground). I accidentally discovered this by using
{} & string
(even though usually I writestring & {}
). It took me some time to notice that I used a somewhat unusual order and that it broke my use case.fixes #53043