@types/bull add jobId to signature of removeRepeatable (#22785)

This commit is contained in:
Gabriel Terwesten
2018-01-10 19:20:32 +01:00
committed by Ryan Cavanaugh
parent c31b287b49
commit a63026685a

13
types/bull/index.d.ts vendored
View File

@@ -4,6 +4,7 @@
// Cameron Crothers <https://github.com/JProgrammer>
// Marshall Cottrell <https://github.com/marshall007>
// Weeco <https://github.com/weeco>
// Gabriel Terwesten <https://github.com/blaugold>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@@ -456,18 +457,18 @@ declare namespace Bull {
nextRepeatableJob(name: string, data: any, opts: JobOptions): Promise<Job>;
/**
* Removes a given repeatable job. The RepeatOpts needs to be the same as the ones used for
* the job when it was added.
* Removes a given repeatable job. The RepeatOptions and JobId needs to be the same as the ones
* used for the job when it was added.
*/
removeRepeatable(repeat: RepeatOptions): Promise<void>;
removeRepeatable(repeat: RepeatOptions & { jobId?: JobId }): Promise<void>;
/**
* Removes a given repeatable job. The RepeatOpts needs to be the same as the ones used for
* the job when it was added.
* Removes a given repeatable job. The RepeatOptions and JobId needs to be the same as the ones
* used for the job when it was added.
*
* name: The name of the to be removed job
*/
removeRepeatable(name: string, repeat: RepeatOptions): Promise<void>;
removeRepeatable(name: string, repeat: RepeatOptions & { jobId?: JobId }): Promise<void>;
/**
* Returns a promise that resolves with the job counts for the given queue.