10 lines
349 B
TypeScript
10 lines
349 B
TypeScript
|
function callb(lam: (l: number) => void );
|
||
|
function callb(lam: (n: string) => void );
|
||
|
function callb(a) { }
|
||
|
callb((a) => { a.length; } ); // error, chose first overload
|
||
|
|
||
|
function callb2(lam: (n: string) => void );
|
||
|
function callb2(lam: (l: number) => void );
|
||
|
function callb2(a) { }
|
||
|
callb2((a) => { a.length; } ); // ok, chose first overload
|