Closed CharlesTaylor7 closed 2 months ago
Hey, that is correct and a bug!
Rest parameters / variadic functions and calling them has been implemented / is currently supported
You can see the calling implementation here https://github.com/kaleidawave/ezno/blob/24e35b98da5a6c705be3cce7eb56dc17bfcb32a4/checker/src/types/calling.rs#L1141
The issue is currently because Console
is typed incorrectly:
https://github.com/kaleidawave/ezno/blob/24e35b98da5a6c705be3cce7eb56dc17bfcb32a4/checker/definitions/overrides.d.ts#L167-L172
I think
console.log
was one of the first functions I added checking for and it was only a while later I added variadic functions. And thus I must have missed updating the definition
This is similar to #118 issue (which I left a comment on the status of reusing TypeScripts lib.d.ts
definition). I have opened #121 which describes how I want to implement it (although it is not quite ready / waiting on some other things).
Unsure whether I should start doing #121 manually or wait for more checking features to be implemented 🤷♂️
This specific issue is fixed in #135
Of course hopefully #121 should wipe out this category of built in mismatches
Checking
Yields an excess argument error.
But, console.log() is variadic though, so I would want this to work.
I'd be happy to work on this, but I'm not sure how builtin function declarations are handled.