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
Expected behavior:
Being able to call an overloaded function with the union of types derived from the overloading of another function. In the provided example, in C2Wrong, param can be either A or B (nothing else), and method method on child accepts both A or B. Is there any reason why I should check myself? Doing so results in nonsense redundant code C2Ok.
Actual behavior:
The compiler complains about the types.
TypeScript Version: 3.9.2
Search Terms:
Expected behavior:
Being able to call an overloaded function with the union of types derived from the overloading of another function. In the provided example, in
C2Wrong
,param
can be eitherA
orB
(nothing else), and methodmethod
onchild
accepts bothA
orB
. Is there any reason why I should check myself? Doing so results in nonsense redundant codeC2Ok
.Actual behavior:
The compiler complains about the types.
Related Issues:
Code
Output
Compiler Options
Playground Link: Provided
The text was updated successfully, but these errors were encountered: