1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-11-10 11:20:19 +00:00
musix-oss/node_modules/retry-request/index.d.ts

23 lines
710 B
TypeScript
Raw Normal View History

2020-03-03 20:30:50 +00:00
declare module 'retry-request' {
import * as request from 'request';
namespace retryRequest {
function getNextRetryDelay(retryNumber: number): void;
interface Options {
objectMode?: boolean,
request?: typeof request,
retries?: number,
noResponseRetries?: number,
currentRetryAttempt?: number,
shouldRetryFn?: (response: request.RequestResponse) => boolean
}
}
function retryRequest(requestOpts: request.Options, opts: retryRequest.Options, callback?: request.RequestCallback)
: { abort: () => void };
function retryRequest(requestOpts: request.Options, callback?: request.RequestCallback)
: { abort: () => void };
export = retryRequest;
}