42 lines
613 B
Text
42 lines
613 B
Text
=== tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithSpecializedCallAndConstructSignatures.ts ===
|
|
interface Foo {
|
|
>Foo : Foo
|
|
|
|
(x: 'a'): number;
|
|
>x : 'a'
|
|
|
|
(x: string): any;
|
|
>x : string
|
|
|
|
new (x: 'a'): any;
|
|
>x : 'a'
|
|
|
|
new (x: string): Object;
|
|
>x : string
|
|
>Object : Object
|
|
}
|
|
|
|
var f: Foo;
|
|
>f : Foo
|
|
>Foo : Foo
|
|
|
|
var r = f('a');
|
|
>r : number
|
|
>f('a') : number
|
|
>f : Foo
|
|
|
|
var r2 = f('A');
|
|
>r2 : any
|
|
>f('A') : any
|
|
>f : Foo
|
|
|
|
var r3 = new f('a');
|
|
>r3 : any
|
|
>new f('a') : any
|
|
>f : Foo
|
|
|
|
var r4 = new f('A');
|
|
>r4 : Object
|
|
>new f('A') : Object
|
|
>f : Foo
|
|
|