brepjs API Reference
    Preparing search index...

    Function tryCatchAsync

    • Wraps an async throwing function into a Result. The mapError function converts the caught exception into the error type.

      Type Parameters

      • T
      • E

      Parameters

      • fn: () => Promise<T>
      • mapError: (error: unknown) => E

      Returns Promise<Result<T, E>>