Closed
Description
TypeScript Version: 3.2.1
Search Terms: spread, arguments
Code
function test(a: number, b: number, c: number, d: number) {
console.log(a, b, c, d);
}
const nums = [0, 1, 2, 3];
test(...nums);
Expected behavior:
the snippet above should compile without error
Actual behavior:
Error TS2556: Expected 4 arguments, but got 0 or more