I have this method, with 2 possibilities:
requestLockInfo(key: string, cb: EVCb<any>): void;
requestLockInfo(key: string, opts: any, cb: EVCb<any>): void;
requestLockInfo(key: string, opts: any, cb: EVCb<any>) {
// implementation
}
the problem is it won't compile, it says:
Does anyone know how to create an optional options object in the signature like this? I have this problem a lot, and making the last argument optional with cb?
doesn't usually solve the root problem.