15 lines
272 B
Text
15 lines
272 B
Text
=== 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[]
|
|
>0 : number
|
|
|
|
return x;
|
|
>x : number
|
|
}
|
|
|