You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use type references for better error messages when relating to a union type #24776
When relating A<Foo> to A<Bar> | B<Baz> | C<Kwah>, if the check fails, it is highly likely that the user wants to see the elaboration from A<Foo> to A<Bar>, rather than for A<Foo> to B<Baz> or A<Foo> to C<Kwah>.
We should try to find candidates when source types are type references, and target types are unions.
As a real-world example, here's an error message where TypeScript had the chance to relate ComponentClass<...> to ComponentClass<...> | StatelessComponent<...>:
changed the title [-]Use type references for better error messages when relating a type to a union type[/-][+]Use type references for better error messages when relating to a union type[/+]on Jun 7, 2018
Activity
[-]Use type references for better error messages when relating a type to a union type[/-][+]Use type references for better error messages when relating to a union type[/+]