Skip to content

feat: Result.all and Result.allSettled combinators #32

@LucasCoppola

Description

@LucasCoppola

Add Result.all and Result.allSettled combinators (+ async versions) to work with arrays of Results, similar to Promise.all and Promise.allSettled.

When working with multiple Results, you often want to either combine them and fail-fast on the first error (Result.all) or collect all results regardless of outcome (Result.allSettled). Similar to .combine and .combineWithAllErrors from neverthrow.

Would also add async versions: Result.allAsync and Result.allSettledAsync.

I've got a version of this working if you want to see a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions