65 lines
2.3 KiB
Text
65 lines
2.3 KiB
Text
=== tests/cases/conformance/types/specifyingTypes/typeLiterals/functionLiteralForOverloads.ts ===
|
|
// basic uses of function literals with overloads
|
|
|
|
var f: {
|
|
>f : Symbol(f, Decl(functionLiteralForOverloads.ts, 2, 3))
|
|
|
|
(x: string): string;
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads.ts, 3, 5))
|
|
|
|
(x: number): number;
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads.ts, 4, 5))
|
|
|
|
} = (x) => x;
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads.ts, 5, 5))
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads.ts, 5, 5))
|
|
|
|
var f2: {
|
|
>f2 : Symbol(f2, Decl(functionLiteralForOverloads.ts, 7, 3))
|
|
|
|
<T>(x: string): string;
|
|
>T : Symbol(T, Decl(functionLiteralForOverloads.ts, 8, 5))
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads.ts, 8, 8))
|
|
|
|
<T>(x: number): number;
|
|
>T : Symbol(T, Decl(functionLiteralForOverloads.ts, 9, 5))
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads.ts, 9, 8))
|
|
|
|
} = (x) => x;
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads.ts, 10, 5))
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads.ts, 10, 5))
|
|
|
|
var f3: {
|
|
>f3 : Symbol(f3, Decl(functionLiteralForOverloads.ts, 12, 3))
|
|
|
|
<T>(x: T): string;
|
|
>T : Symbol(T, Decl(functionLiteralForOverloads.ts, 13, 5))
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads.ts, 13, 8))
|
|
>T : Symbol(T, Decl(functionLiteralForOverloads.ts, 13, 5))
|
|
|
|
<T>(x: T): number;
|
|
>T : Symbol(T, Decl(functionLiteralForOverloads.ts, 14, 5))
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads.ts, 14, 8))
|
|
>T : Symbol(T, Decl(functionLiteralForOverloads.ts, 14, 5))
|
|
|
|
} = (x) => x;
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads.ts, 15, 5))
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads.ts, 15, 5))
|
|
|
|
var f4: {
|
|
>f4 : Symbol(f4, Decl(functionLiteralForOverloads.ts, 17, 3))
|
|
|
|
<T>(x: string): T;
|
|
>T : Symbol(T, Decl(functionLiteralForOverloads.ts, 18, 5))
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads.ts, 18, 8))
|
|
>T : Symbol(T, Decl(functionLiteralForOverloads.ts, 18, 5))
|
|
|
|
<T>(x: number): T;
|
|
>T : Symbol(T, Decl(functionLiteralForOverloads.ts, 19, 5))
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads.ts, 19, 8))
|
|
>T : Symbol(T, Decl(functionLiteralForOverloads.ts, 19, 5))
|
|
|
|
} = (x) => x;
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads.ts, 20, 5))
|
|
>x : Symbol(x, Decl(functionLiteralForOverloads.ts, 20, 5))
|
|
|