PHP WebShell
Текущая директория: /opt/BitGoJS/modules/express/dist
Просмотр файла: retryPromise.d.ts
/**
* Thrown in `retryPromise()`
*
* @prettier
*/
export declare class ErrorMaxRetriesExceededError extends Error {
constructor(maxTries: number);
}
/**
* Retries a promise (like a request) if it returns with 'ECONNREFUSED'. Retries are delayed with an exponential backoff.
* @param {Function} func - Promise to execute. When it throws an error, it is called and passed to onError
* @param {Function} onError - Error handler. Called with error as argument.
* If an error should not be retried, the handler should re-throw the passed error.
* @param params
* @param {Number} params.retryLimit - the maximum number of retries to attempt before giving up.
*/
export declare function retryPromise<T>(func: () => Promise<T>, onError?: (err: Error, tryCount: number) => void, params?: {
retryLimit: number;
}): Promise<T>;
//# sourceMappingURL=retryPromise.d.ts.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!