mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* [bluebird] Rename import to Bluebird for tests * [bluebird] Restore assignability to native Promises * [bluebird] Upgrade TypeScript Versions of all dependents
28 lines
739 B
TypeScript
28 lines
739 B
TypeScript
// Type definitions for bluebird-retry 0.11
|
|
// Project: https://github.com/demmer/bluebird-retry
|
|
// Definitions by: Pascal Vomhoff <https://github.com/pvomhoff>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 3.2
|
|
|
|
import Promise = require('bluebird');
|
|
|
|
declare function retry<T>(func: (param: T) => void, options?: retry.Options): Promise<T>;
|
|
|
|
declare namespace retry {
|
|
interface Options {
|
|
interval?: number;
|
|
backoff?: number;
|
|
max_interval?: number;
|
|
timeout?: number;
|
|
max_tries?: number;
|
|
predicate?: any;
|
|
throw_original?: boolean;
|
|
context?: any;
|
|
args?: any;
|
|
}
|
|
|
|
class StopError extends Error {}
|
|
}
|
|
|
|
export = retry;
|