diff --git a/package.json b/package.json index a8cc27d..63f881c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@navy.gif/wrappers", - "version": "1.3.17", + "version": "1.3.18", "description": "Various wrapper classes I use in my projects", "repository": "https://git.corgi.wtf/Navy.gif/wrappers.git", "author": "Navy.gif", diff --git a/src/MessageBroker.ts b/src/MessageBroker.ts index 955bec7..5a51607 100644 --- a/src/MessageBroker.ts +++ b/src/MessageBroker.ts @@ -300,13 +300,13 @@ class MessageBroker { } } - assertExchange (exchange: string, props: ExchangeDef) { + assertExchange (exchange: string, props?: ExchangeDef) { if (!this.#channel) throw new Error('Channel doesn\'t exist'); - return this.#channel.assertExchange(exchange, props.type ?? 'fanout', props); + return this.#channel.assertExchange(exchange, props?.type ?? 'fanout', props); } - assertQueue (queue: string, opts: QueueDef) { + assertQueue (queue: string, opts?: QueueDef) { if (!this.#channel) throw new Error('Channel doesn\'t exist'); return this.#channel.assertQueue(queue, opts);