2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/contextualTypeAppliedToVarArgs.ts ===
|
|
|
|
function delegate(instance: any, method: (...args: any[]) => any, data?: any): (...args: any[]) => any {
|
2014-08-28 21:52:44 +02:00
|
|
|
>delegate : (instance: any, method: (...args: any[]) => any, data?: any) => (...args: any[]) => any
|
2014-08-15 23:33:16 +02:00
|
|
|
>instance : any
|
|
|
|
>method : (...args: any[]) => any
|
|
|
|
>args : any[]
|
|
|
|
>data : any
|
|
|
|
>args : any[]
|
|
|
|
|
|
|
|
return function () { };
|
|
|
|
>function () { } : () => void
|
|
|
|
}
|
|
|
|
|
|
|
|
class Foo{
|
|
|
|
>Foo : Foo
|
|
|
|
|
|
|
|
|
|
|
|
Bar() {
|
|
|
|
>Bar : () => void
|
|
|
|
|
|
|
|
delegate(this, function (source, args2)
|
2014-08-22 03:39:46 +02:00
|
|
|
>delegate(this, function (source, args2) { var a = source.node; var b = args2.node; } ) : (...args: any[]) => any
|
2014-08-28 21:52:44 +02:00
|
|
|
>delegate : (instance: any, method: (...args: any[]) => any, data?: any) => (...args: any[]) => any
|
2014-08-15 23:33:16 +02:00
|
|
|
>this : Foo
|
2014-08-22 03:39:46 +02:00
|
|
|
>function (source, args2) { var a = source.node; var b = args2.node; } : (source: any, args2: any) => void
|
2014-08-15 23:33:16 +02:00
|
|
|
>source : any
|
|
|
|
>args2 : any
|
|
|
|
{
|
|
|
|
var a = source.node;
|
|
|
|
>a : any
|
|
|
|
>source.node : any
|
|
|
|
>source : any
|
|
|
|
>node : any
|
|
|
|
|
|
|
|
var b = args2.node;
|
|
|
|
>b : any
|
|
|
|
>args2.node : any
|
|
|
|
>args2 : any
|
|
|
|
>node : any
|
|
|
|
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|