type AwaitedPromise = T extends null | undefined ? T : T extends object & { then(onfulfilled: infer F, ...args: infer _): any; } ? F extends (value: infer V, ...args: infer _) => any ? V : never : T; export declare function handleCallbackErrors Promise, PromiseValue = AwaitedPromise>>(fn: Fn, onError: (error: unknown) => void, onFinally?: () => void, onSuccess?: (result: PromiseValue) => void): ReturnType; export declare function handleCallbackErrors any>(fn: Fn, onError: (error: unknown) => void, onFinally?: () => void, onSuccess?: (result: ReturnType) => void): ReturnType; export {}; //# sourceMappingURL=handleCallbackErrors.d.ts.map