@pathmaker-digital/pmd-utilities - v2.2.6
    Preparing search index...

    Type Alias Result<T, E>

    Result: { ok: true; value: T } | { error: E; ok: false }

    A export type that represents the result of an operation that may succeed (Ok) or fail (Err).

    • Ok<T>: Represents success and contains a value of export type T.
    • Err<E>: Represents failure and contains an error of export type E.

    This pattern is useful for handling errors in a functional way without using exceptions.

    Type Parameters

    • T

      The success value export type.

    • E

      The error value export type.