bull-board: Wrong types in bull-board
When I try to compile the following code, this error occurs
const adapters = [new BullAdapter(this.chatroomQueue)];
setQueues(adapters);
Error
Argument of type 'BullAdapter[]' is not assignable to parameter of type 'readonly QueueAdapter[]'.
Type 'BullAdapter' is not assignable to type 'QueueAdapter'.
The types returned by 'getClient()' are incompatible between these types.
It is caused by BullAdapter.getClient() returns Promise<Queue['client']>
while Queue extends EventEmitter and setQueues only accept QueueAdapter[] and QueueAdapter.getClient returns Promise<Redis.Redis>
(Redis.Redis is a type of ioredis)
Please fix the types definition if available, thanks.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 21 (11 by maintainers)
The issue is gone now and can be compiled now, thank you very much