@kellanjs/actioncraft
Version:
Fluent, type-safe builder for Next.js server actions.
7 lines (6 loc) • 396 B
TypeScript
/**
* Executes a callback function safely.
* Any error thrown by the callback is caught and logged (if a logFn is supplied)
* so that it never interrupts the main action flow.
*/
export declare function safeExecuteCallback(callback: (() => Promise<void> | void) | undefined, callbackName: string, logFn?: (level: "error" | "warn", message: string, details?: unknown) => void): Promise<void>;