I'm new to TypeScript, so please forgive me if I've made an error.
On a guide about TypeScript that I found online, it states that the following TypeScript code is valid:
function foo(x, y, z) { }
var args = [0, 1, 2];
foo(...args);
However, when I try to compile my TypeScript using tsc *.ts --watch --target ES6
, I receive an error message saying
error TS2346: Supplied parameters do not match any signature of call target.
Isn't this supposed to work correctly? It seems like a simple task, so what could be going wrong?