DEV Community

Discussion on: Type-Safe Error Handling In TypeScript

Collapse
 
airtucha profile image
Alexey Tukalo

Oh, it looks cool! What is an advantage of having ResultAsync as a separate abstraction?

Thread Thread
 
_gdelgado profile image
Gio

You can think of Result as eagerly evaluated and ResultAsync as lazily evaluated. They're two entirely different mechanisms and thus can't be merged into a single abstraction.