Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
7 lines
716 B
Plaintext
7 lines
716 B
Plaintext
type AwaitedPromise<T> = 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<Fn extends () => Promise<any>, PromiseValue = AwaitedPromise<ReturnType<Fn>>>(fn: Fn, onError: (error: unknown) => void, onFinally?: () => void, onSuccess?: (result: PromiseValue) => void): ReturnType<Fn>;
|
|
export declare function handleCallbackErrors<Fn extends () => any>(fn: Fn, onError: (error: unknown) => void, onFinally?: () => void, onSuccess?: (result: ReturnType<Fn>) => void): ReturnType<Fn>;
|
|
export {};
|
|
//# sourceMappingURL=handleCallbackErrors.d.ts.map |