Open
Description
AMQPConsumer / await q.subscribe callback is set to return a type <void>, however, the example on the README is a Promise<void>
This part:
const consumer = await q.subscribe({noAck: true}, async (msg) => {
console.log(msg.bodyToString())
await consumer.cancel()
})
Warning:
Promise returned in function argument where a void return was expected.sonarlint(typescript:S6544)
(parameter) msg: AMQPMessage
Dropping the async in front of message gets rid of the squiggles:
const consumer = await queue.subscribe({ noAck: true }, (msg: AMQPMessage) => {
const message = msg.bodyToString()
console.log(message)
})
Should probably be <void> | Promise<void>