Evercatch - v0.10.0
    Preparing search index...

    Variable okReadonly

    ok: <T = undefined>(value?: T) => ResultOk<T>

    See ok.

    Type declaration

      • <T = undefined>(value?: T): ResultOk<T>
      • Creates a successful result with the given value.

        Type Parameters

        • T = undefined

          The type of the value.

        Parameters

        • Optionalvalue: T

          The value to wrap in a successful result. Passed through as is.

        Returns ResultOk<T>

        A ResultOk containing the value.

        const [error, value] = ok("Success"); // [null, "Success"]
        
        const [error, value] = ok(); // [null, undefined]