15 lines
552 B
Text
15 lines
552 B
Text
=== tests/cases/compiler/restParameterNoTypeAnnotation.ts ===
|
|
function foo(...rest) {
|
|
>foo : (...rest: any[]) => number, Symbol(foo,Decl(restParameterNoTypeAnnotation.ts,0,0))
|
|
>rest : any[], Symbol(rest,Decl(restParameterNoTypeAnnotation.ts,0,13))
|
|
|
|
var x: number = rest[0];
|
|
>x : number, Symbol(x,Decl(restParameterNoTypeAnnotation.ts,1,8))
|
|
>rest[0] : any
|
|
>rest : any[], Symbol(rest,Decl(restParameterNoTypeAnnotation.ts,0,13))
|
|
>0 : number
|
|
|
|
return x;
|
|
>x : number, Symbol(x,Decl(restParameterNoTypeAnnotation.ts,1,8))
|
|
}
|
|
|