2014-07-13 01:04:16 +02:00
|
|
|
//// [noImplicitAnyWithOverloads.ts]
|
|
|
|
interface A {
|
|
|
|
foo;
|
|
|
|
}
|
|
|
|
interface B { }
|
|
|
|
|
|
|
|
function callb(lam: (l: A) => void);
|
|
|
|
function callb(lam: (n: B) => void);
|
|
|
|
function callb(a) { }
|
|
|
|
callb((a) => { a.foo; }); // error, chose first overload
|
|
|
|
|
|
|
|
//// [noImplicitAnyWithOverloads.js]
|
2015-02-07 03:45:09 +01:00
|
|
|
function callb(a) { }
|
2015-02-07 05:03:24 +01:00
|
|
|
callb(function (a) { a.foo; }); // error, chose first overload
|