Skip to content

Commit e793f8d

Browse files
authored
feat(types): add typescript types to package
1 parent 5207fa3 commit e793f8d

File tree

3 files changed

+1062
-1
lines changed

3 files changed

+1062
-1
lines changed

REFERENCE.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ interface QueueOptions {
7474
prefix?: string = 'bull'; // prefix for all queue keys.
7575
metrics?: MetricsOpts; // Configure metrics
7676
defaultJobOptions?: JobOpts;
77+
createClient?: (type: enum('client', 'subscriber'), redisOpts?: RedisOpts) => redisClient,
7778
settings?: AdvancedSettings;
7879
}
7980
```
@@ -661,7 +662,8 @@ getJobCounts() : Promise<JobCounts>
661662

662663
Returns a promise that will return the job counts for the given queue.
663664

664-
```typescript{
665+
```typescript
666+
{
665667
interface JobCounts {
666668
waiting: number,
667669
active: number,
@@ -881,6 +883,10 @@ A job includes all data needed to perform its execution, as well as the progress
881883

882884
The most important property for the user is `Job#data` that includes the object that was passed to [`Queue#add`](#queueadd), and that is normally used to perform the job.
883885

886+
Other useful job properties:
887+
* `job.attemptsMade`: number of failed attempts.
888+
* `job.finishedOn`: Unix Timestamp, when job is completed or finally failed after all attempts.
889+
884890
### Job#progress
885891

886892
```ts

0 commit comments

Comments
 (0)