TypeScript/tests/baselines/reference/inferSecondaryParameter.types
2015-04-15 16:44:20 -07:00

35 lines
967 B
Plaintext

=== tests/cases/compiler/inferSecondaryParameter.ts ===
// type inference on 'bug' should give 'any'
interface Ib { m(test: string, fn: Function); }
>Ib : Ib
>m : (test: string, fn: Function) => any
>test : string
>fn : Function
>Function : Function
var b: Ib = { m: function (test: string, fn: Function) { } };
>b : Ib
>Ib : Ib
>{ m: function (test: string, fn: Function) { } } : { m: (test: string, fn: Function) => void; }
>m : (test: string, fn: Function) => void
>function (test: string, fn: Function) { } : (test: string, fn: Function) => void
>test : string
>fn : Function
>Function : Function
b.m("test", function (bug) {
>b.m("test", function (bug) { var a: number = bug;}) : any
>b.m : (test: string, fn: Function) => any
>b : Ib
>m : (test: string, fn: Function) => any
>"test" : string
>function (bug) { var a: number = bug;} : (bug: any) => void
>bug : any
var a: number = bug;
>a : number
>bug : any
});