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