Skip to content

Function.errAsync

GitHub Actions edited this page Oct 24, 2024 · 23 revisions

resultar / errAsync

Function: errAsync()

errAsync<T, E>(error): ResultAsync<T, E>

Returns a ResultAsync instance that is immediately resolved with a Result.err(error).

Type Parameters

T = never

E = unknown

Parameters

error: E

The error to be wrapped in a Result.err.

Returns

ResultAsync<T, E>

A ResultAsync instance with the given error and value type T.

Defined in

result-async.ts:396