UNPKG

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) 558 B
import { RetryUtilsOptions } from "../options"; export declare function retryUntilDefinedDecorator<PARAMETERS_TYPE extends any[], RETURN_TYPE>(fn: (...args: PARAMETERS_TYPE) => RETURN_TYPE | null | undefined, retryOptions?: RetryUtilsOptions): (...args: PARAMETERS_TYPE) => Promise<RETURN_TYPE>; export declare function retryAsyncUntilDefinedDecorator<PARAMETERS_TYPE extends any[], RETURN_TYPE>(fn: (...args: PARAMETERS_TYPE) => Promise<RETURN_TYPE | null | undefined>, retryOptions?: RetryUtilsOptions): (...args: PARAMETERS_TYPE) => Promise<RETURN_TYPE>;