From 6449d48de96763d25e42b3a1c19e70113f5a015c Mon Sep 17 00:00:00 2001 From: Patt-tom McDonnell Date: Wed, 3 Jan 2018 01:34:24 +0000 Subject: [PATCH] [@types/bull] Update JobStatus type to be compatible with all Queue methods (#21952) * Update JobStatus type to be compatible with all Queue methods The docs for Bull suggest that methods can take `waiting` as a valid JobStatus but this is incorrect. For example [here](https://github.com/OptimalBits/bull/blob/master/lib/queue.js#L995) the `.clean` method will fail when trying to clean the status `waiting`. This should be changed to `wait` but is currently incompatible with the typings here * use `// tslint:disable-next-line` instead of `// tslint:disable` --- types/bull/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index 810377184e..bcf7fcc770 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -134,7 +134,7 @@ declare namespace Bull { promote(): Promise; } - type JobStatus = 'completed' | 'waiting' | 'active' | 'delayed' | 'failed'; + type JobStatus = 'completed' | 'wait' | 'active' | 'delayed' | 'failed'; interface BackoffOptions { /**