From 5f098b2d6ad61c2712e5dc8b87bf0487654cacc6 Mon Sep 17 00:00:00 2001 From: Shaun Burdick Date: Thu, 6 Dec 2018 10:33:05 -0500 Subject: [PATCH] [@types/amqp-connection-manager] Added missing `ChannelWrapper.removeSetup()` --- types/amqp-connection-manager/index.d.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/types/amqp-connection-manager/index.d.ts b/types/amqp-connection-manager/index.d.ts index ab69aadeb1..e2907b67ee 100644 --- a/types/amqp-connection-manager/index.d.ts +++ b/types/amqp-connection-manager/index.d.ts @@ -136,7 +136,16 @@ export interface ChannelWrapper extends EventEmitter { * Setup functions should, ideally, not throw errors, but if they do then the ChannelWrapper will emit an 'error' event. * @param func */ - addSetup(func: SetupFunc): Promise; + addSetup(func: SetupFunc): Promise; + + /** + * Remove a setup function added with `addSetup`. If there is currently a + * connection, `teardown(channel, [cb])` will be run immediately, and the + * returned Promise will not resolve until it completes. + * @param func + * @param [tearDown] + */ + removeSetup(func: SetupFunc, tearDown?: SetupFunc): Promise; /** * @see amqplib