/** * A decorator that automatically retries a function if it throws an error. * This decorator can be applied to methods in classes, allowing for the automatic * retrying of those methods in case of failure, with a specified number of retries * and delay between attempts. * * @param {number} retries - The maximum number of retry attempts. Default is 3. * @param {number} delay - The delay in milliseconds between each retry attempt. Default is 500ms. * @throws {Error} Throws an error if the `retries` or `delay` parameters are negative. * @throws {Error} Throws an error if applied to a non-method property. * * @example * class ApiService { * @AutoRetry(5, 1000) * async fetchData() { * // Code that might throw an error * } * } * * // This will automatically retry up to 5 times with a 1-second delay between attempts. */ export declare function AutoRetry(retries?: number, delay?: number): (originalMethod: (...args: any[]) => Promise, context: ClassMethodDecoratorContext) => (this: any, ...args: any[]) => Promise;