Closed
Description
Typescript infers that if you touch the arguments
value inside a function that it has extra arguments as ...args: any[]
However if you call a method with an object and one of the fields is called arguments: []
then it thinks you are using the arguments
variable inside of the function, then it adds ...args: any[]
const system = { send(o) {} }
foobar('one');
/**
* @param {string} one
*/
function foobar (one) {
system.send({
api: 'foobar',
arguments: ['hello']
})
}