Skip to content

Commit

Permalink
fix(types): rename strategyOptions to options to reflect js file
Browse files Browse the repository at this point in the history
  • Loading branch information
s-montigny-desautels authored and manast committed May 30, 2023
1 parent e4e6457 commit bae6427
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion PATTERNS.md
Expand Up @@ -199,7 +199,7 @@ myQueue.add({ foo: 'bar' }, {
attempts: 10,
backoff: {
type: 'binaryExponential',
strategyOptions: {
options: {
delay: 500,
truncate: 5
}
Expand Down
2 changes: 1 addition & 1 deletion REFERENCE.md
Expand Up @@ -388,7 +388,7 @@ await queue.add({}, { jobId: 'example' }) // Will not be created, conflicts with
interface BackoffOpts {
type: string; // Backoff type, which can be either `fixed` or `exponential`. A custom backoff strategy can also be specified in `backoffStrategies` on the queue settings.
delay: number; // Backoff delay, in milliseconds.
strategyOptions?: any; // Options for custom strategies
options?: any; // Options for custom strategies
}
```

Expand Down
14 changes: 7 additions & 7 deletions index.d.ts
Expand Up @@ -64,7 +64,7 @@ declare namespace Bull {
* Options passed into the `ioredis` constructor's `options` parameter.
* `connectionName` is overwritten with `Queue.clientName()`. other properties are copied
*/
redis?: Redis.RedisOptions | string| undefined;
redis?: Redis.RedisOptions | string | undefined;

/**
* When specified, the `Queue` will use this function to create new `ioredis` client connections.
Expand Down Expand Up @@ -377,7 +377,7 @@ declare namespace Bull {
/**
* Options for custom strategies
*/
strategyOptions?: any;
options?: any;
}

interface RepeatOptions {
Expand All @@ -395,7 +395,7 @@ declare namespace Bull {
* Number of times the job should repeat at max.
*/
limit?: number | undefined;

/**
* The start value for the repeat iteration count.
*/
Expand Down Expand Up @@ -913,18 +913,18 @@ declare namespace Bull {
* @returns - Returns an object with queue metrics.
*/
getMetrics(
type: 'completed' | 'failed',
start?: number,
type: 'completed' | 'failed',
start?: number,
end?: number
) : Promise<{
): Promise<{
meta: {
count: number;
prevTS: number;
prevCount: number;
};
data: number[];
count: number;
}>
}>;

/**
* Returns a promise that marks the start of a transaction block.
Expand Down

0 comments on commit bae6427

Please sign in to comment.