Skip to content

Introducing "unwrapOr" method for ResultAsync

Choose a tag to compare

@supermacro supermacro released this 02 Jul 19:30
· 652 commits to master since this release

The previous release introduced a super handy method for unwrapping Result<T, E> into a T in a typesafe way.

This release introduces the same unwrapOr method, but for ResultAsync<T, E>!

ResultAsync<T, E>.unwrapOr(defaultValue: T) => Promise<T>

Thanks to @paduc for opening up the PR!