2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/varArgParamTypeCheck.ts ===
|
|
|
|
function sequence(...sequences:{():void;}[]) {
|
2014-10-18 01:53:18 +02:00
|
|
|
>sequence : (...sequences: (() => void)[]) => void
|
|
|
|
>sequences : (() => void)[]
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function callback(clb:()=>void) {
|
2014-08-28 21:52:44 +02:00
|
|
|
>callback : (clb: () => void) => void
|
2014-08-15 23:33:16 +02:00
|
|
|
>clb : () => void
|
|
|
|
}
|
|
|
|
|
|
|
|
sequence(
|
2014-08-22 03:39:46 +02:00
|
|
|
>sequence( function bar() { }, function foo() { callback(()=>{ this(); }); }, function baz() { callback(()=>{ this(); }); }) : void
|
2014-10-18 01:53:18 +02:00
|
|
|
>sequence : (...sequences: (() => void)[]) => void
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
function bar() {
|
2014-08-22 03:39:46 +02:00
|
|
|
>function bar() { } : () => void
|
2014-08-15 23:33:16 +02:00
|
|
|
>bar : () => void
|
|
|
|
|
|
|
|
},
|
|
|
|
function foo() {
|
2014-08-22 03:39:46 +02:00
|
|
|
>function foo() { callback(()=>{ this(); }); } : () => void
|
2014-08-15 23:33:16 +02:00
|
|
|
>foo : () => void
|
|
|
|
|
|
|
|
callback(()=>{
|
2014-08-22 03:39:46 +02:00
|
|
|
>callback(()=>{ this(); }) : void
|
2014-08-28 21:52:44 +02:00
|
|
|
>callback : (clb: () => void) => void
|
2014-08-22 03:39:46 +02:00
|
|
|
>()=>{ this(); } : () => void
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
this();
|
|
|
|
>this() : any
|
|
|
|
>this : any
|
|
|
|
|
|
|
|
});
|
|
|
|
},
|
|
|
|
function baz() {
|
2014-08-22 03:39:46 +02:00
|
|
|
>function baz() { callback(()=>{ this(); }); } : () => void
|
2014-08-15 23:33:16 +02:00
|
|
|
>baz : () => void
|
|
|
|
|
|
|
|
callback(()=>{
|
2014-08-22 03:39:46 +02:00
|
|
|
>callback(()=>{ this(); }) : void
|
2014-08-28 21:52:44 +02:00
|
|
|
>callback : (clb: () => void) => void
|
2014-08-22 03:39:46 +02:00
|
|
|
>()=>{ this(); } : () => void
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
this();
|
|
|
|
>this() : any
|
|
|
|
>this : any
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|