Evercatch - v0.10.0
    Preparing search index...

    Function ok

    • 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]