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
// A *self-contained* demonstration of the problem follows...classAnimal{a: string;}classDogextendsAnimal{b: string;}functiontest(func: (p: Dog)=>any): any;functiontest(func: (p: Animal)=>any): any;functiontest(func: (p: Animal)=>any): any{returnundefined;}
Expected behavior:
No TS2394 Compiler error
Actual behavior:
a TS2394 Compiler error for this line:
functiontest(func: (p: Dog)=>any): any;
Changing function definition the below resolves the compile error: