Skip to content

Namespace Result<T, E>

Result<T, E> = Success<T, E> | Failure<T, E>

Source: result.ts

Represents either a success or a failure.

Can be used as the return value of a function instead of throwing errors. This improves type-safety and helps you control the flow of your function.

This is inspired by neverthrow by supermacro.

A success can be created using Result.ok and a failure using Result.error.

Type Parameters

T

T

E

E

Built by Prozilla