-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Seek most-overlapping types when relating object types in unions #26450
Comments
I'm not sure if this is a valid ask. Would it be possible to use the most-overlapping declaration in error message for overloads too? declare function f(a: string, b: string, c: string): void;
declare function f(a: () => string, b: () => string, c: () => string): void;
f('1', '1', {}); Actual |
@bowenni I think that is a UX improvement we want to see, but I'd rather we file a different issue there. Overload resolution is pretty complicated and would warrant its own work item. |
A vote on this over from Pulumi land. We have extensive use of union types, and errors here can be painful :) |
Similar problem with Vue. Code: Vue.extend({
props: {
value: null
}
}) 3.0.1:
2.9.2:
|
Doesn't "dive in" to the objects like @joeduffy and @CyrusNajmabadi were hoping for, but a fix is up on #27087. Maybe @weswigham has some ideas here. |
From @rkirov at DefinitelyTyped/DefinitelyTyped#28044 (comment)
Expected
Actual
The text was updated successfully, but these errors were encountered: