Closed
Description
TypeScript Version: 2.4.0-20170609
Code
interface IFace {
do(x: number): number
do(x: string): string
}
function func(param: number | string, obj: IFace) {
obj.do(param);
}
Expected behavior:
No compile errors. We have do
overloads for both both types of params
Actual behavior:
Compile error. No overload found for do
with argument of type number | string
// cc @roblourens