function foo(one: number, two?: string = undefined, three?: number = undefined) {}
foo(123, 123)
// ^^^
// Argument of type 'number' is not assignable to parameter of type 'string'.ts(2345)
I was hoping to figure out how to make this call work such that if you omit any of the trailing optional parameters it'll work properly based on the type and number of parameters.
I'm building a typings for an existing API that was written to accept this type and i'm not sure how to do it. Thanks!