-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Skip comparing optional property flag when comparing against discriminant properties #38101
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
Skip comparing optional property flag when comparing against discriminant properties #38101
Conversation
@typescript-bot run 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.
Looks good, just want to make sure the comparability change doesn't affect anything in rwc.
The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master. |
DT looks OK, user tests look OK, and RWC is zero diff, This seems good~ |
@DanielRosenwasser does this need to be ported to |
le sigh @typescript-bot cherry-pick this to release-3.9 and LKG |
Heya @DanielRosenwasser, I've started to run the task to cherry-pick this into |
Hey @DanielRosenwasser, I've opened #38199 for you. |
Component commits: f0aeef1 Skip comparing optional property flag when comparing against discriminant properties
…e-3.9 (#38199) * Cherry-pick PR #38101 into release-3.9 Component commits: f0aeef1 Skip comparing optional property flag when comparing against discriminant properties * Update LKG Co-authored-by: Wesley Wigham <[email protected]> Co-authored-by: typescript-bot <[email protected]>
When
strictNullChecks
is on. When that's the case,{x: string | undefined}
and{x?: string | undefined}
should now both match{x: string} | {x?: undefined}
and{x: string} | {x: undefined}
. (Since an optionalundefined
is the same as anundefined
field in everything except what we require be written in declarations).Fixes #35204