TypeScript/tests/baselines/reference/functionCall13.js

22 lines
372 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [functionCall13.ts]
function foo(a:string, ...b:number[]){}
foo('foo', 1);
foo('foo');
foo();
foo(1, 'bar');
foo('foo', 1, 3);
//// [functionCall13.js]
function foo(a) {
var b = [];
for (var _i = 1; _i < arguments.length; _i++) {
b[_i - 1] = arguments[_i];
}
}
2014-07-13 01:04:16 +02:00
foo('foo', 1);
foo('foo');
foo();
foo(1, 'bar');
foo('foo', 1, 3);