• Create an instance of ResultAsync containing an Err variant of Result

    Equivalent to new ResultAsync(Promise.resolve(new Err(err)))

    Type Parameters

    • T = never

      The type of the value contained in the Result for the success case

    • E = unknown

      The type of the error contained in the Result for the failure case

    Parameters

    • err: E

      The value to wrap in a Result.Err.

    Returns ResultAsync<T, E>

  • Create an instance of ResultAsync containing an Err variant of Result

    Equivalent to new ResultAsync(Promise.resolve(new Err(err)))

    Type Parameters

    • T = never

      The type of the value contained in the Result for the success case

    • _E extends void = void

    Parameters

    • err: void

      The value to wrap in a Result.Err.

    Returns ResultAsync<T, void>