Skip to content

Variable.ok

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

resultar / ok

Variable: ok()

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

Defined in: result.ts:626

Call Signature

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

Creates a new Result instance representing a successful operation.

Type Parameters

T

T

E

E = never

Parameters

value

T

The value to be wrapped in the Result instance.

Returns

Result<T, E>

A new Result instance with the provided value.

Call Signature

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

Creates a new Result instance representing a successful operation.

Type Parameters

T

T extends void = void

E

E = never

Parameters

value

void

The value to be wrapped in the Result instance.

Returns

Result<void, E>

A new Result instance with the provided value.

Clone this wiki locally