DEV Community

Discussion on: Type-Safe Error Handling In TypeScript

Collapse
 
_gdelgado profile image
Gio

Hey Alexey,

Thanks for the kind words :)

Note that neverthrow implements a promisible interface as well.

See the ResultAsync docs here

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.