15 lines
259 B
Plaintext
15 lines
259 B
Plaintext
|
=== tests/cases/compiler/restParameterNoTypeAnnotation.ts ===
|
||
|
function foo(...rest) {
|
||
|
>foo : (...rest: any[]) => number
|
||
|
>rest : any[]
|
||
|
|
||
|
var x: number = rest[0];
|
||
|
>x : number
|
||
|
>rest[0] : any
|
||
|
>rest : any[]
|
||
|
|
||
|
return x;
|
||
|
>x : number
|
||
|
}
|
||
|
|