Closed
Description
Consider following example:
console.log(...['Hello', 'world']);
It's a completely valid console.log
usage scenario however TypeScript (@1.6.2) raises TS2346 error: Supplied parameters do not match any signature of call target.
The log's signature is:
declare function log(message?: any, ...optionalParams: any[]);
Therefore following code:
console.log('Hello', ...['world']);
is considered valid, without any errors.
In my opinion the top example should not trigger any errors.