TypeScript/tests/baselines/reference/emitDefaultParametersFunctionProperty.types
2015-04-13 14:29:37 -07:00

33 lines
2.2 KiB
Plaintext

=== tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionProperty.ts ===
var obj2 = {
>obj2 : { func1(y?: number, ...rest: any[]): void; func2(x?: string): void; func3(x: string, z: number, y?: string): void; func4(x: string, z: number, y?: string, ...rest: any[]): void; }, Symbol(obj2, Decl(emitDefaultParametersFunctionProperty.ts, 0, 3))
>{ func1(y = 10, ...rest) { }, func2(x = "hello") { }, func3(x: string, z: number, y = "hello") { }, func4(x: string, z: number, y = "hello", ...rest) { },} : { func1(y?: number, ...rest: any[]): void; func2(x?: string): void; func3(x: string, z: number, y?: string): void; func4(x: string, z: number, y?: string, ...rest: any[]): void; }
func1(y = 10, ...rest) { },
>func1 : (y?: number, ...rest: any[]) => void, Symbol(func1, Decl(emitDefaultParametersFunctionProperty.ts, 0, 12))
>y : number, Symbol(y, Decl(emitDefaultParametersFunctionProperty.ts, 1, 10))
>10 : number
>rest : any[], Symbol(rest, Decl(emitDefaultParametersFunctionProperty.ts, 1, 17))
func2(x = "hello") { },
>func2 : (x?: string) => void, Symbol(func2, Decl(emitDefaultParametersFunctionProperty.ts, 1, 31))
>x : string, Symbol(x, Decl(emitDefaultParametersFunctionProperty.ts, 2, 10))
>"hello" : string
func3(x: string, z: number, y = "hello") { },
>func3 : (x: string, z: number, y?: string) => void, Symbol(func3, Decl(emitDefaultParametersFunctionProperty.ts, 2, 27))
>x : string, Symbol(x, Decl(emitDefaultParametersFunctionProperty.ts, 3, 10))
>z : number, Symbol(z, Decl(emitDefaultParametersFunctionProperty.ts, 3, 20))
>y : string, Symbol(y, Decl(emitDefaultParametersFunctionProperty.ts, 3, 31))
>"hello" : string
func4(x: string, z: number, y = "hello", ...rest) { },
>func4 : (x: string, z: number, y?: string, ...rest: any[]) => void, Symbol(func4, Decl(emitDefaultParametersFunctionProperty.ts, 3, 49))
>x : string, Symbol(x, Decl(emitDefaultParametersFunctionProperty.ts, 4, 10))
>z : number, Symbol(z, Decl(emitDefaultParametersFunctionProperty.ts, 4, 20))
>y : string, Symbol(y, Decl(emitDefaultParametersFunctionProperty.ts, 4, 31))
>"hello" : string
>rest : any[], Symbol(rest, Decl(emitDefaultParametersFunctionProperty.ts, 4, 44))
}