@eoussama/core
    Preparing search index...

    Function tryCatch

    • Type Parameters

      • TErr extends Error
      • TRes

      Parameters

      • fn: (...args: unknown[]) => Promise<TRes>

        The function to try to catch the error of

      Returns Promise<TResult<TErr, TRes>>

      A promise that resolves to an array of [data, null] if the promise resolves, or [null, error] if the promise rejects

      Try to catch the of a function