28 lines
1.1 KiB
Text
28 lines
1.1 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
|
||
|
>rest : any[]
|
||
|
|
||
|
func2(x = "hello") { },
|
||
|
>func2 : (x?: string) => void
|
||
|
>x : string
|
||
|
|
||
|
func3(x: string, z: number, y = "hello") { },
|
||
|
>func3 : (x: string, z: number, y?: string) => void
|
||
|
>x : string
|
||
|
>z : number
|
||
|
>y : 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
|
||
|
>rest : any[]
|
||
|
}
|