TypeScript/tests/baselines/reference/functionLiteral.symbols
2015-04-15 16:44:20 -07:00

40 lines
1.5 KiB
Plaintext

=== tests/cases/conformance/types/specifyingTypes/typeLiterals/functionLiteral.ts ===
// basic valid forms of function literals
var x = () => 1;
>x : Symbol(x, Decl(functionLiteral.ts, 2, 3), Decl(functionLiteral.ts, 3, 3))
var x: {
>x : Symbol(x, Decl(functionLiteral.ts, 2, 3), Decl(functionLiteral.ts, 3, 3))
(): number;
}
var y: { (x: string): string; };
>y : Symbol(y, Decl(functionLiteral.ts, 7, 3), Decl(functionLiteral.ts, 8, 3))
>x : Symbol(x, Decl(functionLiteral.ts, 7, 10))
var y: (x: string) => string;
>y : Symbol(y, Decl(functionLiteral.ts, 7, 3), Decl(functionLiteral.ts, 8, 3))
>x : Symbol(x, Decl(functionLiteral.ts, 8, 8))
var y2: { <T>(x: T): T; } = <T>(x: T) => x
>y2 : Symbol(y2, Decl(functionLiteral.ts, 9, 3))
>T : Symbol(T, Decl(functionLiteral.ts, 9, 11))
>x : Symbol(x, Decl(functionLiteral.ts, 9, 14))
>T : Symbol(T, Decl(functionLiteral.ts, 9, 11))
>T : Symbol(T, Decl(functionLiteral.ts, 9, 11))
>T : Symbol(T, Decl(functionLiteral.ts, 9, 29))
>x : Symbol(x, Decl(functionLiteral.ts, 9, 32))
>T : Symbol(T, Decl(functionLiteral.ts, 9, 29))
>x : Symbol(x, Decl(functionLiteral.ts, 9, 32))
var z: { new (x: number): number; };
>z : Symbol(z, Decl(functionLiteral.ts, 11, 3), Decl(functionLiteral.ts, 12, 3))
>x : Symbol(x, Decl(functionLiteral.ts, 11, 14))
var z: new (x: number) => number;
>z : Symbol(z, Decl(functionLiteral.ts, 11, 3), Decl(functionLiteral.ts, 12, 3))
>x : Symbol(x, Decl(functionLiteral.ts, 12, 12))