This commit is contained in:
Erik 2023-05-15 15:27:33 +03:00
parent 50a4cb8535
commit 17d9d124fe
Signed by: Navy.gif
GPG Key ID: 2532FBBB61C65A68
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@navy.gif/wrappers", "name": "@navy.gif/wrappers",
"version": "1.3.17", "version": "1.3.18",
"description": "Various wrapper classes I use in my projects", "description": "Various wrapper classes I use in my projects",
"repository": "https://git.corgi.wtf/Navy.gif/wrappers.git", "repository": "https://git.corgi.wtf/Navy.gif/wrappers.git",
"author": "Navy.gif", "author": "Navy.gif",

View File

@ -300,13 +300,13 @@ class MessageBroker {
} }
} }
assertExchange (exchange: string, props: ExchangeDef) { assertExchange (exchange: string, props?: ExchangeDef) {
if (!this.#channel) if (!this.#channel)
throw new Error('Channel doesn\'t exist'); 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) if (!this.#channel)
throw new Error('Channel doesn\'t exist'); throw new Error('Channel doesn\'t exist');
return this.#channel.assertQueue(queue, opts); return this.#channel.assertQueue(queue, opts);