mirror of
https://github.com/swc-project/swc.git
synced 2024-12-19 03:31:45 +03:00
11 lines
528 B
TypeScript
11 lines
528 B
TypeScript
|
module CallSignature {
|
||
|
declare function foo1(cb: (x: number) => void): typeof cb;
|
||
|
declare function foo1(cb: any): any;
|
||
|
var r = foo1((x: number) => 1); // ok because base returns void
|
||
|
var r2 = foo1(<T>(x: T) => ''); // ok because base returns void
|
||
|
|
||
|
declare function foo2(cb: (x: number, y: number) => void): typeof cb;
|
||
|
declare function foo2(cb: any): any;
|
||
|
var r3 = foo2((x: number, y: number) => 1); // ok because base returns void
|
||
|
var r4 = foo2(<T>(x: T) => ''); // ok because base returns void
|
||
|
}
|