Evercatch - v0.8.0
    Preparing search index...

    Function ok

    • Creates a successful result with the given value.

      Type Parameters

      • T = null

        The type of the value.

      Parameters

      • Optionalvalue: T

        The value to wrap in a successful result. Defaults to null if not provided.

      Returns ResultOk<T>

      A ResultOk containing the value.

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