Thanks, but it doesn't really answer the original question. Catch clauses and rejections are rightfully untyped. I thought he tried to explain something differently
Comments
Log in with your Bluesky account to leave a comment
No, that was what I meant: To me, `void` implies “the result of the .finally()` callback will be completely ignored and will never have any effect”. @tjallingt.com’s example shows that returning a rejected Promise does have an effect.
Comments
On one hand:
Promise.resolve().finally(() => Promise.reject()); // OK
On the other hand:
function f(): void {
return Promise.reject();
// Type 'Promise
}
Either way, I’d still find `void | Promise