UNPKG

@visulima/email

Version:

A comprehensive email library with multi-provider support, crypto utilities, and template engines

11 lines (10 loc) 526 B
import type { Result } from "../types.d.ts"; /** * Helper function to retry an async function with exponential backoff. * @param function_ The async function to retry. * @param retries Number of retry attempts (default: 3). * @param delay Initial delay in milliseconds (default: 300, doubles on each retry). * @returns A result object containing the function result or error. */ declare const retry: <T>(function_: () => Promise<Result<T>>, retries?: number, delay?: number) => Promise<Result<T>>; export default retry;