-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Filter primitives from union when checking for mismatched excess props if nonprimitive type is present #31708
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
Filter primitives from union when checking for mismatched excess props if nonprimitive type is present #31708
Conversation
@@ -12869,6 +12869,16 @@ namespace ts { | |||
return bestMatch; | |||
} | |||
|
|||
function filterPrimitivesIfContainsNonPrimitive(type: UnionType) { | |||
if (some(type.types, t => !!(t.flags & TypeFlags.NonPrimitive))) { |
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.
Pretty sure there's a someTypeHasFlags
or something
…s if nonprimitive type is present
a1c5b5d
to
b235998
Compare
@typescript-bot run dt |
Heya @weswigham, I've started to run the extended test suite on this PR at b235998. You can monitor the build here. It should now contribute to this PR's status checks. |
Heya @weswigham, I've started to run the parallelized Definitely Typed test suite on this PR at b235998. You can monitor the build here. It should now contribute to this PR's status checks. |
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.
Seems a little ad-hoc but all of excess property checking is ad-hoc.
Fixes #31668