#Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.

8 messages · Page 1 of 1 (latest)

dusky thistleBOT
#
bawdyinkslinger#0

Preview:```ts
function either(/* variadic */) {
if (arguments.length === 0) {
return
}

return Array.prototype.concat.apply([], arguments)
}```

vernal wadi
#

I am refactoring legacy JavaScript code. Is there a way to get this to compile without changing the JavaScript implementation?

#

By that I mean only changing the types

slim grove
#

assertions

#

there's not really anything else to do since you can't retype arguments afaik

#

oh actually wait

vernal wadi
#

okay thanks