@huddle01/web-core
Version:
The Huddle01 Javascript SDK offers a comprehensive suite of methods and event listeners that allow for seamless real-time audio and video communication with minimal coding required.
12 lines (10 loc) • 665 B
text/typescript
/**
* Retries an asynchronous function with exponential backoff.
* @param {Function} func - The asynchronous function to retry.
* @param {number} maxRetries - The maximum number of retries.
* @param {number} initialDelay - The initial delay in milliseconds before retrying.
* @param {number} maxDelay - The maximum delay in milliseconds between retries.
* @returns {Promise<unknown>} - A Promise that resolves to the result of `func` or rejects after all retries fail.
*/
declare const retryAsyncWithBackof: <T = unknown>(func: () => Promise<T>, maxRetries?: number, initialDelay?: number, maxDelay?: number) => Promise<T>;
export { retryAsyncWithBackof };