25 lines
574 B
Text
25 lines
574 B
Text
=== tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunction.ts ===
|
|
function foo(x: string, y = 10) { }
|
|
>foo : (x: string, y?: number) => void
|
|
>x : string
|
|
>y : number
|
|
>10 : number
|
|
|
|
function baz(x: string, y = 5, ...rest) { }
|
|
>baz : (x: string, y?: number, ...rest: any[]) => void
|
|
>x : string
|
|
>y : number
|
|
>5 : number
|
|
>rest : any[]
|
|
|
|
function bar(y = 10) { }
|
|
>bar : (y?: number) => void
|
|
>y : number
|
|
>10 : number
|
|
|
|
function bar1(y = 10, ...rest) { }
|
|
>bar1 : (y?: number, ...rest: any[]) => void
|
|
>y : number
|
|
>10 : number
|
|
>rest : any[]
|
|
|