Promise Union - This expression is not callable.
Hello,
From version 0.6.0 I am getting errors on function that returns union of promises.
This expression is not callable. Each member of the union type '{ <TResult1 = number, TResult2 = never>(onfulfilled?: ((value: number) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<...>) | null | undefined): Promise<...>; <TResult1 = number, TResult2 = never>(onfulfilled?: ((value: number) => TResult1 | PromiseLike...' has signatures, but none of those signatures are compatible with each other.typescript(2349)
probably related to: ts-reset/dist/promise-catch.d.ts
here is url, where issue is recreated: https://codesandbox.io/p/sandbox/4lnj2q
I'm having the same issue.
Same repro in TS playground:
https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAIgAIwjAhgGwLQwJ5gCmAzgMZTBgwD0Mx2UJhMCA3AFDukQB2x8AVx7BeABSgQQwYoTgBeOD0IB3OOMnTCACi2NiASnkA+OAG8AvofTF2cOAB81EqTIA8PASABGhKEdsOThpuAG4QwAAmRhzcfPBgzpoA6sAwABYAqsK8AEokApjwCkqq6i7auiSGciYWVsRB5a4BHt6+gWGR7NGcQiI8ZZoAdOmEPDp61bWWHAnBhCnpWf15xAUwI2ljE1XGZjPsQA
Probably because Promise<number | void> is not exactly the same as Promise<number> | Promise<void>