• Wrap an async operation that may throw an Error (try-catch style) into checked exception style

    Type Parameters

    • T

    • E = unknown

    Parameters

    • op: (() => Promise<T>)

      The operation function

        • (): Promise<T>
        • Returns Promise<T>

    Returns Promise<Result<T, E>>

©2020 - 2024 Oraichain Foundation