Skip to content

Conversation

@weswigham
Copy link
Member

Fixes #35390

We assume that if getSignatureApplicabilityError produces an error for a non-normal check mode, that under Normal check mode it will as well. In the example given in the issue, getSignatureApplicabilityError under CheckMode.SkipContextSensitive produced an error result, because the onChange property was an intersection type of the anyFunctionType and another type, which, when intersected just became that other type - this, in turn, caused an assignability error. Under Normal mode, the context-sensitive function is checked, and found, when intersected with that type, to satisfy the relationship. Ergo, the correct fix is to preserve the anyFunctionType in intersections (rather than omitting it as though it were an empty object), so its behavior can propagate.

@weswigham weswigham merged commit 88677de into microsoft:master Jan 7, 2020
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error: Debug Failure. No error for 3 or fewer overload signatures

2 participants