Skip to main content
Module

x/retry/retry/utils/untilDefined/decorators.ts>retryUntilDefinedDecorator

Re-execute a function until it does not throw an error or execute a function with a timeout.
Very Popular
Latest
function retryUntilDefinedDecorator
import { retryUntilDefinedDecorator } from "https://deno.land/x/retry@v2.0.0/retry/utils/untilDefined/decorators.ts";

Type Parameters

PARAMETERS_TYPE extends any[]
RETURN_TYPE

Parameters

fn: (...args: PARAMETERS_TYPE) => RETURN_TYPE | undefined | null
optional
retryOptions: RetryUtilsOptions

Returns

(...args: PARAMETERS_TYPE) => Promise<RETURN_TYPE>