UNPKG

idsaepe

Version:
14 lines (13 loc) 405 B
import { retry, retryAsync } from "."; export function retryAsyncDecorator(fn, retryOptions) { return (...args) => { const wrappedFn = () => fn(...args); return retryAsync(wrappedFn, retryOptions); }; } export function retryDecorator(fn, retryOptions) { return (...args) => { const wrappedFn = () => fn(...args); return retry(wrappedFn, retryOptions); }; }