ts-retry
Version:
A little retry tool to execute a function until the function is successful. Can also bind a timeout to a function. This lib is usable in typescript, in javascript, in node, in SPA tools (rest, Vue, Svelte...) and browser (available in ESM and common js fo
4 lines (3 loc) • 507 B
TypeScript
import { RetryOptions } from "../../options";
export declare function retryAsyncDecorator<RETURN_TYPE extends (...args: any[]) => Promise<any>>(fn: RETURN_TYPE, retryOptions?: RetryOptions<ReturnType<RETURN_TYPE>>): (...args: Parameters<RETURN_TYPE>) => ReturnType<RETURN_TYPE>;
export declare function retryDecorator<RETURN_TYPE extends (...args: any[]) => any>(fn: RETURN_TYPE, retryOptions?: RetryOptions<ReturnType<RETURN_TYPE>>): (...args: Parameters<RETURN_TYPE>) => Promise<ReturnType<RETURN_TYPE>>;