UNPKG

appwrite-utils

Version:

`appwrite-utils` is a comprehensive TypeScript library designed to streamline the development process for Appwrite projects. It provides a suite of utilities and helper functions that facilitate data manipulation, schema management, and seamless integrati

9 lines (8 loc) 514 B
/** * Tries to execute the given createFunction and retries up to 5 times if it fails. * * @param {() => Promise<any>} createFunction - The function to be executed. * @param {number} [attemptNum=0] - The number of attempts made so far (default: 0). * @return {Promise<any>} - A promise that resolves to the result of the createFunction or rejects with an error if it fails after 5 attempts. */ export declare const tryAwaitWithRetry: <T>(createFunction: () => Promise<T>, attemptNum?: number) => Promise<T>;