11import type { DeletionConfig } from '@message-queue-toolkit/core'
22import { isProduction } from '@message-queue-toolkit/core'
3- import type { Channel , Connection } from 'amqplib'
3+ import type { Channel , ChannelModel } from 'amqplib'
44
55import type {
66 AMQPQueueCreationConfig ,
@@ -11,7 +11,7 @@ import type {
1111} from '../AbstractAmqpService'
1212
1313export async function checkQueueExists (
14- connection : Connection ,
14+ connection : ChannelModel ,
1515 locatorConfig : AMQPQueueLocator ,
1616) : Promise < void > {
1717 // queue check breaks channel if not successful
@@ -28,7 +28,7 @@ export async function checkQueueExists(
2828}
2929
3030export async function checkExchangeExists (
31- connection : Connection ,
31+ connection : ChannelModel ,
3232 locatorConfig : AMQPTopicPublisherConfig ,
3333) : Promise < void > {
3434 // exchange check breaks channel if not successful
@@ -45,7 +45,7 @@ export async function checkExchangeExists(
4545}
4646
4747export async function ensureAmqpQueue (
48- connection : Connection ,
48+ connection : ChannelModel ,
4949 channel : Channel ,
5050 creationConfig ?: AMQPQueueCreationConfig ,
5151 locatorConfig ?: AMQPQueueLocator ,
@@ -61,7 +61,7 @@ export async function ensureAmqpQueue(
6161}
6262
6363export async function ensureAmqpTopicSubscription (
64- connection : Connection ,
64+ connection : ChannelModel ,
6565 channel : Channel ,
6666 creationConfig ?: AMQPTopicCreationConfig ,
6767 locatorConfig ?: AMQPTopicLocator ,
@@ -84,7 +84,7 @@ export async function ensureAmqpTopicSubscription(
8484}
8585
8686export async function ensureExchange (
87- connection : Connection ,
87+ connection : ChannelModel ,
8888 channel : Channel ,
8989 creationConfig ?: AMQPTopicPublisherConfig ,
9090 locatorConfig ?: AMQPTopicPublisherConfig ,
0 commit comments