mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-02 06:29:40 +08:00
Add clientProperties object to ConnectionOptions (#20277)
This commit is contained in:
committed by
Masahiro Wakame
parent
d06df01e3c
commit
0840a8fe71
@@ -3,6 +3,7 @@ import * as amqp from 'amqp';
|
||||
async function connect() {
|
||||
const promise = new Promise<amqp.AMQPClient>((resolve, reject) => {
|
||||
const client = amqp.createConnection({
|
||||
clientProperties: { applicationName: 'typing' },
|
||||
url: 'amqp://admin:password@localhost:5672'
|
||||
});
|
||||
|
||||
|
||||
14
types/amqp/index.d.ts
vendored
14
types/amqp/index.d.ts
vendored
@@ -1,6 +1,7 @@
|
||||
// Type definitions for amqp 0.2
|
||||
// Project: https://github.com/postwait/node-amqp
|
||||
// Definitions by: Carl Winkler <https://github.com/seikho>
|
||||
// Mark Line <https://github.com/jonnysparkplugs>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user