29 lines
737 B
Text
29 lines
737 B
Text
=== tests/cases/compiler/argumentsObjectIterator01_ES6.ts ===
|
|
|
|
function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] {
|
|
>doubleAndReturnAsArray : (x: number, y: number, z: number) => [number, number, number]
|
|
>x : number
|
|
>y : number
|
|
>z : number
|
|
|
|
let result = [];
|
|
>result : any[]
|
|
>[] : undefined[]
|
|
|
|
for (let arg of arguments) {
|
|
>arg : any
|
|
>arguments : IArguments
|
|
|
|
result.push(arg + arg);
|
|
>result.push(arg + arg) : number
|
|
>result.push : (...items: any[]) => number
|
|
>result : any[]
|
|
>push : (...items: any[]) => number
|
|
>arg + arg : any
|
|
>arg : any
|
|
>arg : any
|
|
}
|
|
return <[any, any, any]>result;
|
|
><[any, any, any]>result : [any, any, any]
|
|
>result : any[]
|
|
}
|