Skip to content

Commit e2e6491

Browse files
committed
refactor: Minor fixes to #181 for types and new typescript version.
1 parent 449f5db commit e2e6491

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/AmqpConnectionManager.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ export interface IAmqpConnectionManager {
8282
addListener(event: 'unblocked', listener: () => void): this;
8383
addListener(event: 'disconnect', listener: (arg: { err: Error }) => void): this;
8484

85-
listeners(eventName: string | symbol): any;
85+
// eslint-disable-next-line @typescript-eslint/ban-types
86+
listeners(eventName: string | symbol): Function[];
8687

8788
on(event: string, listener: (...args: any[]) => void): this;
8889
on(event: 'connect', listener: ConnectListener): this;

test/AmqpConnectionManagerTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ describe('AmqpConnectionManager', function () {
165165
let err;
166166
try {
167167
await amqp.connect({ timeout: 0.1 });
168-
} catch (error) {
168+
} catch (error: any) {
169169
err = error;
170170
}
171171
expect(err.message).to.equal('amqp-connection-manager: connect timeout');

test/integrationTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ describe('Integration tests', () => {
7676
let err;
7777
try {
7878
await connection.connect();
79-
} catch (error) {
79+
} catch (error: any) {
8080
err = error;
8181
}
8282
expect(err.message).to.contain('ACCESS-REFUSED');

0 commit comments

Comments
 (0)