31 lines
1.2 KiB
Text
31 lines
1.2 KiB
Text
=== tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionPropertyES6.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; }
|
|
>{ 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
|
|
>y : number
|
|
>10 : number
|
|
>rest : any[]
|
|
|
|
func2(x = "hello") { },
|
|
>func2 : (x?: string) => void
|
|
>x : string
|
|
>"hello" : string
|
|
|
|
func3(x: string, z: number, y = "hello") { },
|
|
>func3 : (x: string, z: number, y?: string) => void
|
|
>x : string
|
|
>z : number
|
|
>y : string
|
|
>"hello" : string
|
|
|
|
func4(x: string, z: number, y = "hello", ...rest) { },
|
|
>func4 : (x: string, z: number, y?: string, ...rest: any[]) => void
|
|
>x : string
|
|
>z : number
|
|
>y : string
|
|
>"hello" : string
|
|
>rest : any[]
|
|
}
|