diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index 8486e03f59..c204fea135 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -8,6 +8,7 @@ // Oleg Repin // David Koblas // Bond Akinmade +// Wuha Team // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -534,7 +535,7 @@ declare namespace Bull { * 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 & { jobId?: JobId }): Promise; + removeRepeatable(repeat: (CronRepeatOptions | EveryRepeatOptions) & { jobId?: JobId }): Promise; /** * Removes a given repeatable job. The RepeatOptions and JobId needs to be the same as the ones @@ -542,7 +543,13 @@ declare namespace Bull { * * name: The name of the to be removed job */ - removeRepeatable(name: string, repeat: RepeatOptions & { jobId?: JobId }): Promise; + removeRepeatable(name: string, repeat: (CronRepeatOptions | EveryRepeatOptions) & { jobId?: JobId }): Promise; + + /** + * Returns a promise that will return an array of job instances of the given types. + * Optional parameters for range and ordering are provided. + */ + getJobs(types: string[], start?: number, end?: number, asc?: boolean): Promise; /** * Returns a promise that resolves with the job counts for the given queue.