Uh oh!
There was an error while loading. Please reload this page.
Avoid calculating union in spread if property types are identical - #53413
Conversation
Jake Bailey (jakebailey)
commented
Mar 21, 2023
TypeScript Bot (@typescript-bot) test this |
Heya Jake Bailey (@jakebailey), I've started to run the parallelized Definitely Typed test suite on this PR at 958017d. You can monitor the build here. Update: The results are in! |
Heya Jake Bailey (@jakebailey), I've started to run the abridged perf test suite on this PR at 958017d. You can monitor the build here. Update: The results are in! |
Heya Jake Bailey (@jakebailey), I've started to run the diff-based user code test suite on this PR at 958017d. You can monitor the build here. Update: The results are in! |
Heya Jake Bailey (@jakebailey), I've started to run the diff-based top-repos suite on this PR at 958017d. You can monitor the build here. Update: The results are in! |
Heya Jake Bailey (@jakebailey), I've started to run the extended test suite on this PR at 958017d. You can monitor the build here. |
TypeScript Bot (typescript-bot)
commented
Mar 21, 2023
Jake Bailey (@jakebailey) Here are the results of running the user test suite comparing Everything looks good! |
TypeScript Bot (typescript-bot)
commented
Mar 21, 2023
Jake Bailey (@jakebailey) Here they are:Comparison Report - main..53413
System
Hosts
Scenarios
Developer Information: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TypeScript Bot (typescript-bot)
commented
Mar 21, 2023
Jake Bailey (@jakebailey) Here are the results of running the top-repos suite comparing Everything looks good! |
TypeScript Bot (typescript-bot)
commented
Mar 21, 2023
Hey Jake Bailey (@jakebailey), it looks like the DT test run failed. Please check the log for more details. |
Jake Bailey (jakebailey)
commented
Mar 21, 2023
TypeScript Bot (@typescript-bot) run dt but this time don't fail please |
Heya Jake Bailey (@jakebailey), I've started to run the parallelized Definitely Typed test suite on this PR at 958017d. You can monitor the build here. Update: The results are in! |
Jake Bailey (jakebailey)
commented
Mar 21, 2023
TypeScript Bot (@typescript-bot) pack this |
Heya Jake Bailey (@jakebailey), I've started to run the tarball bundle task on this PR at 958017d. You can monitor the build here. |
Hey Jake Bailey (@jakebailey), I've packed this into an installable tgz. You can install it for testing by referencing it in your and then running There is also a playground for this build and an npm module you can use via |
TypeScript Bot (typescript-bot)
commented
Mar 21, 2023
Hey Jake Bailey (@jakebailey), the results of running the DT tests are ready. |
For #52345
When spreading, we remove
undefinedfrom the right type and union it with the left. If the two types are huge but overlap, we'll add all of the union's members together into one big list, then run subtype reduction over it, which for this test takes a long time. But, we can skip that work if we can recognize that left/right are the same. With #53406, this eliminates all of the bottlenecks in #52345.Since this spread stuff is tricky, I generated a test which tests all combos of spreading + optional + missing to verify that I don't screw it up.
Likely, there's something more general that could be done to
getUnionTypehere; it always recurses into every union and then does subtype reduction. I wonder if we can deduplicate the list first (ignoring undefined-ness), and trivially bail out early where possible, but that seemed a little tricky.