Skip to content

Function.okAsync

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

resultar / okAsync

Function: okAsync()

Call Signature

okAsync<T, E>(value): ResultAsync<T, E>

Defined in: result-async.ts:468

Returns a ResultAsync instance that is immediately resolved with a Result.ok(value).

Type Parameters

T

E = never

Parameters

value

T

The value to be wrapped in a Result.ok.

Returns

ResultAsync<T, E>

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

Call Signature

okAsync<T, E>(value): ResultAsync<void, E>

Defined in: result-async.ts:468

Returns a ResultAsync instance that is immediately resolved with a Result.ok(value).

Type Parameters

T extends void = void

E = never

Parameters

value

void

The value to be wrapped in a Result.ok.

Returns

ResultAsync<void, E>

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

Clone this wiki locally