Skip to content

Variable.okAsync

GitHub Actions edited this page May 22, 2025 · 1 revision

resultar / okAsync

Variable: okAsync()

const okAsync: {<T, E>(value): ResultAsync<T, E>; <T, E>(value): ResultAsync<void, E>; } = ResultAsync.okAsync

Defined in: result-async.ts:472

Call Signature

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

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

Type Parameters

T

T

E

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

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

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

Type Parameters

T

T extends void = void

E

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