UNPKG

@solidgrounds/core

Version:
14 lines (13 loc) 596 B
export declare class AsyncError extends Error { readonly pending: Promise<void>; readonly retry: () => Promise<void>; constructor(pending: Promise<void>, retry: () => Promise<void>); } /** * Catches async error, and try to resolve the promise. */ export declare const handleAsyncError: (e: unknown) => Promise<void>; /** * This function will be called during compile time. Retry everything until all async service functions are resolved. */ export declare const retryUntilNoAsyncErrors: <A extends unknown[]>(callback: (...args: A) => Promise<void>, ...args: A) => Promise<void>;