Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@types/backo2) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Installation
npm install --save @types/backo2
Summary
This package contains type definitions for backo2 (https://github.com/mokesmokes/backo).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/backo2.
index.d.ts
type BackoffOptions = Partial<{
min: number;
max: number;
jitter: number;
factor: number;
}>;
declare class Backoff {
constructor(opts?: BackoffOptions);
/**
* The number of previous attempts
*/
attempts: number;
/**
* A lower bound on the duration between attempts
*/
ms: number;
/**
* An upper bound on the duration between attempts
*/
max: number;
/**
* An upper bound on the variance around the duration between attempts
*/
jitter: number;
/**
* The base to which the attempt is raised as an exponent
*/
factor: number;
/**
* Compute the backoff duration and increment the number of attempts
*/
duration(): number;
/**
* Reset the number of attempts
*/
reset(): void;
/**
* Set the minimum duration between attempts
*/
setMin(min: number): void;
/**
* Set the maximum duration between attempts
*/
setMax(max: number): void;
/**
* Set the jitter
*/
setJitter(jitter: number): void;
}
export = Backoff;
Additional Details
- Last updated: Mon, 06 Nov 2023 22:41:04 GMT
- Dependencies: none
Credits
These definitions were written by Retsam.