Skip to content

Function.errAsync

GitHub Actions edited this page Mar 5, 2025 · 27 revisions

resultar / errAsync

Function: errAsync()

Call Signature

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

Defined in: result-async.ts:469

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

Type Parameters

T = never

E = unknown

Parameters

err

E

Returns

ResultAsync<T, E>

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

Call Signature

errAsync<T, E>(err): ResultAsync<T, void>

Defined in: result-async.ts:469

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

Type Parameters

T = never

E extends void = void

Parameters

err

void

Returns

ResultAsync<T, void>

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

Clone this wiki locally