• Creates a new Ok instance representing a successful value.

    Type Parameters

    • T

      The type of the value

    Parameters

    • value: T

      The successful value to wrap

    Returns Result<T>

    A Result containing the successful value

    const result = ok(42);
    // result = Ok(42)