From 0840a8fe718111ce39de54f21e8abf355d393dbd Mon Sep 17 00:00:00 2001 From: Mark Line Date: Wed, 4 Oct 2017 14:26:54 +0100 Subject: [PATCH] Add clientProperties object to ConnectionOptions (#20277) --- types/amqp/amqp-tests.ts | 1 + types/amqp/index.d.ts | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/types/amqp/amqp-tests.ts b/types/amqp/amqp-tests.ts index 7940f44ed4..dfe38f2676 100644 --- a/types/amqp/amqp-tests.ts +++ b/types/amqp/amqp-tests.ts @@ -3,6 +3,7 @@ import * as amqp from 'amqp'; async function connect() { const promise = new Promise((resolve, reject) => { const client = amqp.createConnection({ + clientProperties: { applicationName: 'typing' }, url: 'amqp://admin:password@localhost:5672' }); diff --git a/types/amqp/index.d.ts b/types/amqp/index.d.ts index 374a03322b..ca39ce4404 100644 --- a/types/amqp/index.d.ts +++ b/types/amqp/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for amqp 0.2 // Project: https://github.com/postwait/node-amqp // Definitions by: Carl Winkler +// Mark Line // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -125,6 +126,19 @@ export interface ConnectionOptions { /** Default: 1000 */ reconnectBackoffTime?: number; + + clientProperties?: { + applicationName?: string; + capabilities?: { + consumer_cancel_notify?: boolean + } + /** Default: 'node-' + process.version */ + platform?: string; + /** Default: node-amqp */ + product?: string; + /** Default: 'nodeAMQPVersion' */ + version?: string; + }; } export interface QueueOptions {