Saltearse al contenido

utils/dynamicResult

Esta página aún no está disponible en tu idioma.

type Failure<E> = [null, E];

Defined in: utils/dynamicResult.ts:11^

The Failure type represents a failure with an error of type E. It is used to indicate that an operation failed and contains the error.

E


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

Defined in: utils/dynamicResult.ts:19^

The Result type is a discriminated union that can either be a Success or a Failure. It is used to represent the outcome of an operation, where:

  • Success represents a successful result with a value of type T.
  • Failure represents a failure with an error of type E.

T

E


type Success<T> = [T, null];

Defined in: utils/dynamicResult.ts:5^

The Success type represents a successful result with a value of type T. It is used to indicate that an operation was successful and contains the result.

T