Skip to main content

Function: withAsyncErrorHandling()

withAsyncErrorHandling(operation: () => Promise<void>, operationName: string): () => void

Defined in: src/utils/fallbacks.ts:71

Type-safe utility for React async event handlers.

Parametersโ€‹

operationโ€‹

() => Promise<void>

Async operation to execute.

operationNameโ€‹

string

Name for logging purposes.

Returnsโ€‹

Synchronous callback suitable for React event handlers.

(): void

Returnsโ€‹

void

Remarksโ€‹

Prevents void return type issues with async operations by returning a synchronous callback that internally awaits the supplied operation.