Uh oh!
There was an error while loading. Please reload this page.
Don't compare "missing" to undefined in compareProperties under exactOptionalPropertyTypes - #61683
Conversation
Jake Bailey (jakebailey)
commented
May 9, 2025
TypeScript Bot (@typescript-bot) test it |
TypeScript Bot (typescript-bot)
commented
May 9, 2025
Hey Jake Bailey (@jakebailey), the results of running the DT tests are ready. Everything looks the same! |
TypeScript Bot (typescript-bot)
commented
May 9, 2025
Jake Bailey (@jakebailey) Here are the results of running the user tests with tsc comparing Everything looks good! |
undefined in compareProperties under exactOptionalPropertyTypesTypeScript Bot (typescript-bot)
commented
May 9, 2025
Jake Bailey (@jakebailey) Here they are:tscComparison Report - baseline..pr
System info unknown Hosts
Scenarios
Developer Information: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TypeScript Bot (typescript-bot)
commented
May 9, 2025
Jake Bailey (@jakebailey) Here are the results of running the top 400 repos with tsc comparing Everything looks good! |
Jake Bailey (@jakebailey) given the likelihood of this being an oversight when As you saw, I was hoping to get confirmation from the original author Anders Hejlsberg (@ahejlsberg) that it was simply a case of "missed a spot" when changing |
Jake Bailey (jakebailey)
commented
Jun 9, 2025
TypeScript Bot (@typescript-bot) pack this |
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 |
Testing #61547 with Playground Link, are these errors right? The first one is the reported one, sure, but it's seemingly missing two errors. I think this PR should be encoding all of the test provided in the issue in any case. But, it's not clear if the new behavior is correct either. |
Jake Bailey (@jakebailey) hi! Can you explain what you mean by "missing two errors"? Not sure I follow. The issue is complaining that the |
Jake Bailey (jakebailey)
commented
Jun 9, 2025
The example seemingly implies that under |
Jake Bailey (jakebailey)
commented
Jun 9, 2025
Hm, I might have some wires crossed in my explanation given there are 2 playgrounds, 2 settings, and 4 assertions (sorry, I need to explain it better), but the gist is that it seems like this PR introduces errors into one of the variants that weren't there previously in 5.8. |
Hans Brende (HansBrende)
commented
Jun 10, 2025
Jake Bailey (@jakebailey) I can see how the issue could be misconstrued, however, simply changing the environment to 5.8.3 shows that the first assertion does pass currently. The issue was raised to highlight that the first assertion should fail but currently passes. This is the reason for the "❌" in the comment above just that one assertion: identifying that this current behavior is incorrect. The subsequent assertions are only provided to show that under
I'm still not seeing these 2 failures you're mentioning... opening your playground link gives me what I would expect:
Yes, this is absolutely correct and very much intended! The whole point of the issue is to do exactly that, to introduce one error into the first assertion. (If there were any other assertions besides the first that became an error, that would definitely be a bug in my implementation, but I don't see how that could be possible because I haven't touched those code paths.) |
Jake Bailey (jakebailey)
commented
Jun 10, 2025
Hans Brende (HansBrende)
commented
Jun 10, 2025
Jake Bailey (@jakebailey) correct, because Let me know if you need anything else from me! 😃 |
Hans Brende (HansBrende)
commented
Jul 16, 2025
Jake Bailey (@jakebailey) anything else you need from me on this and/or anything blocking this PR being accepted? Should I click "Update branch" or does that not matter? |
Jake Bailey (jakebailey)
commented
Jul 21, 2025
Nothing; we are in a code freeze until we open the tree for 6.0. |
Hans Brende (HansBrende)
commented
Sep 18, 2025
Jake Bailey (@jakebailey) follow-up: I see that typescript has been publishing "6.0.0-dev" versions on npm for a while now, does that imply that the tree has opened for 6.0 and the code freeze has ended or did you mean something else? |
Jake Bailey (jakebailey)
commented
Sep 18, 2025
Yes, that's correct. |
Jake Bailey (jakebailey)
commented
Sep 22, 2025
This PR needs a merge from main to be unblocked. |
Hans Brende (HansBrende)
commented
Sep 22, 2025
Hans Brende (HansBrende)
commented
Sep 23, 2025
Jake Bailey (@jakebailey) I noticed the branch is already out of date again: do you need me to keep merging from main every time I see it goes out of date to remain unblocked? Happy to do so if that's the case. |
Jake Bailey (jakebailey)
commented
Sep 23, 2025
Nope, I asked for a merge because we added some new required CI checks that weren't present on the branch the last time CI ran. |
Uh oh!
There was an error while loading. Please reload this page.
…pertyTypes` is enabled (#1246) Fixing issues with optional tuple properties following changes coming soon to TypeScript discovered by the canary tests: https://github.com/remeda/remeda/actions/runs/20653076637. Specifically following this change: microsoft/TypeScript#61683





Fixes#61547
I'm aware that the underlying issue is (currently) labeled "not a defect", however, the behavior is undeniably strange, most likely simply overlooked when exactOptionalPropertyTypes was implemented, in my view. Therefore I am opening this PR to demonstrate what an easy fix it is (and that no other tests are broken as a result).