-
Notifications
You must be signed in to change notification settings - Fork 0
Function.fromSafePromise
GitHub Actions edited this page Oct 24, 2024
·
23 revisions
resultar / fromSafePromise
fromSafePromise<
T
,E
>(promise
):ResultAsync
<T
,E
>
Returns a ResultAsync instance that is resolved with a Result.ok(value) or Result.err(error) based on the provided promise.
• T
• E = never
• promise: PromiseLike
<T
>
The promise to be wrapped in a ResultAsync.
ResultAsync
<T
, E
>
A ResultAsync instance with the given promise and error type E.