58 lines
2 KiB
Text
58 lines
2 KiB
Text
=== tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionExpression.ts ===
|
|
var lambda1 = (y = "hello") => { }
|
|
>lambda1 : (y?: string) => void
|
|
>(y = "hello") => { } : (y?: string) => void
|
|
>y : string
|
|
>"hello" : string
|
|
|
|
var lambda2 = (x: number, y = "hello") => { }
|
|
>lambda2 : (x: number, y?: string) => void
|
|
>(x: number, y = "hello") => { } : (x: number, y?: string) => void
|
|
>x : number
|
|
>y : string
|
|
>"hello" : string
|
|
|
|
var lambda3 = (x: number, y = "hello", ...rest) => { }
|
|
>lambda3 : (x: number, y?: string, ...rest: any[]) => void
|
|
>(x: number, y = "hello", ...rest) => { } : (x: number, y?: string, ...rest: any[]) => void
|
|
>x : number
|
|
>y : string
|
|
>"hello" : string
|
|
>rest : any[]
|
|
|
|
var lambda4 = (y = "hello", ...rest) => { }
|
|
>lambda4 : (y?: string, ...rest: any[]) => void
|
|
>(y = "hello", ...rest) => { } : (y?: string, ...rest: any[]) => void
|
|
>y : string
|
|
>"hello" : string
|
|
>rest : any[]
|
|
|
|
var x = function (str = "hello", ...rest) { }
|
|
>x : (str?: string, ...rest: any[]) => void
|
|
>function (str = "hello", ...rest) { } : (str?: string, ...rest: any[]) => void
|
|
>str : string
|
|
>"hello" : string
|
|
>rest : any[]
|
|
|
|
var y = (function (num = 10, boo = false, ...rest) { })()
|
|
>y : void
|
|
>(function (num = 10, boo = false, ...rest) { })() : void
|
|
>(function (num = 10, boo = false, ...rest) { }) : (num?: number, boo?: boolean, ...rest: any[]) => void
|
|
>function (num = 10, boo = false, ...rest) { } : (num?: number, boo?: boolean, ...rest: any[]) => void
|
|
>num : number
|
|
>10 : number
|
|
>boo : boolean
|
|
>false : boolean
|
|
>rest : any[]
|
|
|
|
var z = (function (num: number, boo = false, ...rest) { })(10)
|
|
>z : void
|
|
>(function (num: number, boo = false, ...rest) { })(10) : void
|
|
>(function (num: number, boo = false, ...rest) { }) : (num: number, boo?: boolean, ...rest: any[]) => void
|
|
>function (num: number, boo = false, ...rest) { } : (num: number, boo?: boolean, ...rest: any[]) => void
|
|
>num : number
|
|
>boo : boolean
|
|
>false : boolean
|
|
>rest : any[]
|
|
>10 : number
|
|
|