20 lines
394 B
Text
20 lines
394 B
Text
=== tests/cases/compiler/functionWithDefaultParameterWithNoStatements13.ts ===
|
|
var v: any[];
|
|
>v : any[]
|
|
|
|
function foo(a = [1 + 1]) { }
|
|
>foo : (a?: number[]) => void
|
|
>a : number[]
|
|
>[1 + 1] : number[]
|
|
>1 + 1 : number
|
|
>1 : number
|
|
>1 : number
|
|
|
|
function bar(a = [1 + 1]) {
|
|
>bar : (a?: number[]) => void
|
|
>a : number[]
|
|
>[1 + 1] : number[]
|
|
>1 + 1 : number
|
|
>1 : number
|
|
>1 : number
|
|
}
|