I noticed we cannot express certain variable signatures in declarations:
more strictly defined parameter.
What I want is something like this:
Also with optional callback:
While currently I have to settle for
My first use case is the
: their api allows to pass a variable amount of arguments to the next function in the chain but with the final argument always being the callback. I want to declare this in updated
DefinitelyTyped declarations but it's impossible to model now so I have to make them any and hope people remember the callback.
For actual TypeScript code it'll work with additional code generation but could be undesirable.
I think this should work in declarations at least.