Closed
Description
I hope that variable parameters supported.
When I compiled the below codes.
function sum(...args: i32[]): i32 {
let total: i32 = 0;
for (let index = 0; index < args.length; index ++) {
total += args[index];
}
return total;
}
assert(sum(1, 2, 3) == 6);
I got the errors.
ERROR TS2554: Expected 1 arguments, but got 3.
btw, the online studio was unavailable.
ERROR: Entry file 'main.ts' not found.