78 lines
2.6 KiB
Text
78 lines
2.6 KiB
Text
=== tests/cases/conformance/types/specifyingTypes/typeLiterals/functionLiteralForOverloads2.ts ===
|
|
// basic uses of function literals with constructor overloads
|
|
|
|
class C {
|
|
>C : Symbol(C, Decl(functionLiteralForOverloads2.ts, 0, 0))
|
|
|
|
constructor(x: string);
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads2.ts, 3, 16))
|
|
|
|
constructor(x: number);
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads2.ts, 4, 16))
|
|
|
|
constructor(x) { }
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads2.ts, 5, 16))
|
|
}
|
|
|
|
class D<T> {
|
|
>D : Symbol(D, Decl(functionLiteralForOverloads2.ts, 6, 1))
|
|
>T : Symbol(T, Decl(functionLiteralForOverloads2.ts, 8, 8))
|
|
|
|
constructor(x: string);
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads2.ts, 9, 16))
|
|
|
|
constructor(x: number);
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads2.ts, 10, 16))
|
|
|
|
constructor(x) { }
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads2.ts, 11, 16))
|
|
}
|
|
|
|
var f: {
|
|
>f : Symbol(f, Decl(functionLiteralForOverloads2.ts, 14, 3))
|
|
|
|
new(x: string): C;
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads2.ts, 15, 8))
|
|
>C : Symbol(C, Decl(functionLiteralForOverloads2.ts, 0, 0))
|
|
|
|
new(x: number): C;
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads2.ts, 16, 8))
|
|
>C : Symbol(C, Decl(functionLiteralForOverloads2.ts, 0, 0))
|
|
|
|
} = C;
|
|
>C : Symbol(C, Decl(functionLiteralForOverloads2.ts, 0, 0))
|
|
|
|
var f2: {
|
|
>f2 : Symbol(f2, Decl(functionLiteralForOverloads2.ts, 19, 3))
|
|
|
|
new<T>(x: string): C;
|
|
>T : Symbol(T, Decl(functionLiteralForOverloads2.ts, 20, 8))
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads2.ts, 20, 11))
|
|
>C : Symbol(C, Decl(functionLiteralForOverloads2.ts, 0, 0))
|
|
|
|
new<T>(x: number): C;
|
|
>T : Symbol(T, Decl(functionLiteralForOverloads2.ts, 21, 8))
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads2.ts, 21, 11))
|
|
>C : Symbol(C, Decl(functionLiteralForOverloads2.ts, 0, 0))
|
|
|
|
} = C;
|
|
>C : Symbol(C, Decl(functionLiteralForOverloads2.ts, 0, 0))
|
|
|
|
var f3: {
|
|
>f3 : Symbol(f3, Decl(functionLiteralForOverloads2.ts, 24, 3))
|
|
|
|
new<T>(x: string): D<T>;
|
|
>T : Symbol(T, Decl(functionLiteralForOverloads2.ts, 25, 8))
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads2.ts, 25, 11))
|
|
>D : Symbol(D, Decl(functionLiteralForOverloads2.ts, 6, 1))
|
|
>T : Symbol(T, Decl(functionLiteralForOverloads2.ts, 25, 8))
|
|
|
|
new<T>(x: number): D<T>;
|
|
>T : Symbol(T, Decl(functionLiteralForOverloads2.ts, 26, 8))
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads2.ts, 26, 11))
|
|
>D : Symbol(D, Decl(functionLiteralForOverloads2.ts, 6, 1))
|
|
>T : Symbol(T, Decl(functionLiteralForOverloads2.ts, 26, 8))
|
|
|
|
} = D;
|
|
>D : Symbol(D, Decl(functionLiteralForOverloads2.ts, 6, 1))
|
|
|