154 lines
6.5 KiB
Plaintext
154 lines
6.5 KiB
Plaintext
=== tests/cases/conformance/types/objectTypeLiteral/constructSignatures/constructSignaturesWithOverloads.ts ===
|
|
// No errors expected for basic overloads of construct signatures
|
|
|
|
class C {
|
|
>C : Symbol(C, Decl(constructSignaturesWithOverloads.ts, 0, 0))
|
|
|
|
constructor(x: number, y?: string);
|
|
>x : Symbol(x, Decl(constructSignaturesWithOverloads.ts, 3, 16))
|
|
>y : Symbol(y, Decl(constructSignaturesWithOverloads.ts, 3, 26))
|
|
|
|
constructor(x: number, y: string);
|
|
>x : Symbol(x, Decl(constructSignaturesWithOverloads.ts, 4, 16))
|
|
>y : Symbol(y, Decl(constructSignaturesWithOverloads.ts, 4, 26))
|
|
|
|
constructor(x: number) { }
|
|
>x : Symbol(x, Decl(constructSignaturesWithOverloads.ts, 5, 16))
|
|
}
|
|
|
|
var r1 = new C(1, '');
|
|
>r1 : Symbol(r1, Decl(constructSignaturesWithOverloads.ts, 8, 3))
|
|
>C : Symbol(C, Decl(constructSignaturesWithOverloads.ts, 0, 0))
|
|
|
|
class C2<T> {
|
|
>C2 : Symbol(C2, Decl(constructSignaturesWithOverloads.ts, 8, 22))
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 10, 9))
|
|
|
|
constructor(x: T, y?: string);
|
|
>x : Symbol(x, Decl(constructSignaturesWithOverloads.ts, 11, 16))
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 10, 9))
|
|
>y : Symbol(y, Decl(constructSignaturesWithOverloads.ts, 11, 21))
|
|
|
|
constructor(x: T, y: string);
|
|
>x : Symbol(x, Decl(constructSignaturesWithOverloads.ts, 12, 16))
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 10, 9))
|
|
>y : Symbol(y, Decl(constructSignaturesWithOverloads.ts, 12, 21))
|
|
|
|
constructor(x: T) { }
|
|
>x : Symbol(x, Decl(constructSignaturesWithOverloads.ts, 13, 16))
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 10, 9))
|
|
}
|
|
|
|
var r2 = new C2(1, '');
|
|
>r2 : Symbol(r2, Decl(constructSignaturesWithOverloads.ts, 16, 3))
|
|
>C2 : Symbol(C2, Decl(constructSignaturesWithOverloads.ts, 8, 22))
|
|
|
|
interface I {
|
|
>I : Symbol(I, Decl(constructSignaturesWithOverloads.ts, 16, 23))
|
|
|
|
new(x: number, y?: string): C;
|
|
>x : Symbol(x, Decl(constructSignaturesWithOverloads.ts, 19, 8))
|
|
>y : Symbol(y, Decl(constructSignaturesWithOverloads.ts, 19, 18))
|
|
>C : Symbol(C, Decl(constructSignaturesWithOverloads.ts, 0, 0))
|
|
|
|
new(x: number, y: string): C;
|
|
>x : Symbol(x, Decl(constructSignaturesWithOverloads.ts, 20, 8))
|
|
>y : Symbol(y, Decl(constructSignaturesWithOverloads.ts, 20, 18))
|
|
>C : Symbol(C, Decl(constructSignaturesWithOverloads.ts, 0, 0))
|
|
}
|
|
|
|
var i: I;
|
|
>i : Symbol(i, Decl(constructSignaturesWithOverloads.ts, 23, 3))
|
|
>I : Symbol(I, Decl(constructSignaturesWithOverloads.ts, 16, 23))
|
|
|
|
var r3 = new i(1, '');
|
|
>r3 : Symbol(r3, Decl(constructSignaturesWithOverloads.ts, 24, 3))
|
|
>i : Symbol(i, Decl(constructSignaturesWithOverloads.ts, 23, 3))
|
|
|
|
interface I2<T> {
|
|
>I2 : Symbol(I2, Decl(constructSignaturesWithOverloads.ts, 24, 22))
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 26, 13))
|
|
|
|
new (x: T, y?: string): C2<T>;
|
|
>x : Symbol(x, Decl(constructSignaturesWithOverloads.ts, 27, 9))
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 26, 13))
|
|
>y : Symbol(y, Decl(constructSignaturesWithOverloads.ts, 27, 14))
|
|
>C2 : Symbol(C2, Decl(constructSignaturesWithOverloads.ts, 8, 22))
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 26, 13))
|
|
|
|
new (x: T, y: string): C2<T>;
|
|
>x : Symbol(x, Decl(constructSignaturesWithOverloads.ts, 28, 9))
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 26, 13))
|
|
>y : Symbol(y, Decl(constructSignaturesWithOverloads.ts, 28, 14))
|
|
>C2 : Symbol(C2, Decl(constructSignaturesWithOverloads.ts, 8, 22))
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 26, 13))
|
|
|
|
new <T>(x: T, y?: string): C2<T>;
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 29, 9))
|
|
>x : Symbol(x, Decl(constructSignaturesWithOverloads.ts, 29, 12))
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 29, 9))
|
|
>y : Symbol(y, Decl(constructSignaturesWithOverloads.ts, 29, 17))
|
|
>C2 : Symbol(C2, Decl(constructSignaturesWithOverloads.ts, 8, 22))
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 29, 9))
|
|
|
|
new <T>(x: T, y: string): C2<T>;
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 30, 9))
|
|
>x : Symbol(x, Decl(constructSignaturesWithOverloads.ts, 30, 12))
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 30, 9))
|
|
>y : Symbol(y, Decl(constructSignaturesWithOverloads.ts, 30, 17))
|
|
>C2 : Symbol(C2, Decl(constructSignaturesWithOverloads.ts, 8, 22))
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 30, 9))
|
|
|
|
}
|
|
|
|
var i2: I2<number>;
|
|
>i2 : Symbol(i2, Decl(constructSignaturesWithOverloads.ts, 34, 3))
|
|
>I2 : Symbol(I2, Decl(constructSignaturesWithOverloads.ts, 24, 22))
|
|
|
|
var r4 = new i2(1, '');
|
|
>r4 : Symbol(r4, Decl(constructSignaturesWithOverloads.ts, 35, 3))
|
|
>i2 : Symbol(i2, Decl(constructSignaturesWithOverloads.ts, 34, 3))
|
|
|
|
var a: {
|
|
>a : Symbol(a, Decl(constructSignaturesWithOverloads.ts, 37, 3))
|
|
|
|
new(x: number, y?: string): C;
|
|
>x : Symbol(x, Decl(constructSignaturesWithOverloads.ts, 38, 8))
|
|
>y : Symbol(y, Decl(constructSignaturesWithOverloads.ts, 38, 18))
|
|
>C : Symbol(C, Decl(constructSignaturesWithOverloads.ts, 0, 0))
|
|
|
|
new(x: number, y: string): C;
|
|
>x : Symbol(x, Decl(constructSignaturesWithOverloads.ts, 39, 8))
|
|
>y : Symbol(y, Decl(constructSignaturesWithOverloads.ts, 39, 18))
|
|
>C : Symbol(C, Decl(constructSignaturesWithOverloads.ts, 0, 0))
|
|
}
|
|
|
|
var r5 = new a(1, '');
|
|
>r5 : Symbol(r5, Decl(constructSignaturesWithOverloads.ts, 42, 3))
|
|
>a : Symbol(a, Decl(constructSignaturesWithOverloads.ts, 37, 3))
|
|
|
|
var b: {
|
|
>b : Symbol(b, Decl(constructSignaturesWithOverloads.ts, 44, 3))
|
|
|
|
new<T>(x: T, y?: string): C2<T>;
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 45, 8))
|
|
>x : Symbol(x, Decl(constructSignaturesWithOverloads.ts, 45, 11))
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 45, 8))
|
|
>y : Symbol(y, Decl(constructSignaturesWithOverloads.ts, 45, 16))
|
|
>C2 : Symbol(C2, Decl(constructSignaturesWithOverloads.ts, 8, 22))
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 45, 8))
|
|
|
|
new<T>(x: T, y: string): C2<T>;
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 46, 8))
|
|
>x : Symbol(x, Decl(constructSignaturesWithOverloads.ts, 46, 11))
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 46, 8))
|
|
>y : Symbol(y, Decl(constructSignaturesWithOverloads.ts, 46, 16))
|
|
>C2 : Symbol(C2, Decl(constructSignaturesWithOverloads.ts, 8, 22))
|
|
>T : Symbol(T, Decl(constructSignaturesWithOverloads.ts, 46, 8))
|
|
}
|
|
|
|
var r6 = new b(1, '');
|
|
>r6 : Symbol(r6, Decl(constructSignaturesWithOverloads.ts, 49, 3))
|
|
>b : Symbol(b, Decl(constructSignaturesWithOverloads.ts, 44, 3))
|
|
|