2014-07-13 01:04:16 +02:00
|
|
|
//// [inferSecondaryParameter.ts]
|
|
|
|
// type inference on 'bug' should give 'any'
|
|
|
|
|
|
|
|
interface Ib { m(test: string, fn: Function); }
|
|
|
|
|
|
|
|
var b: Ib = { m: function (test: string, fn: Function) { } };
|
|
|
|
|
|
|
|
b.m("test", function (bug) {
|
|
|
|
var a: number = bug;
|
|
|
|
});
|
|
|
|
|
|
|
|
//// [inferSecondaryParameter.js]
|
2014-08-19 19:43:13 +02:00
|
|
|
// type inference on 'bug' should give 'any'
|
2015-03-09 02:23:23 +01:00
|
|
|
var b = {
|
|
|
|
m: function (test, fn) {
|
|
|
|
}
|
|
|
|
};
|
2014-07-13 01:04:16 +02:00
|
|
|
b.m("test", function (bug) {
|
|
|
|
var a = bug;
|
|
|
|
});
|