0.0.35 • Published 6 months ago
@types/amqp-rpc v0.0.35
Installation
npm install --save @types/amqp-rpc
Summary
This package contains type definitions for amqp-rpc (https://github.com/demchenkoe/node-amqp-rpc/).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/amqp-rpc.
index.d.ts
// Type definitions for amqp-rpc v0.0.8
// Project: https://github.com/demchenkoe/node-amqp-rpc/
// Definitions by: Wonshik Kim <https://github.com/wokim>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
export interface Options {
connection?: any;
url?: string | undefined;
exchangeInstance?: any;
exchange?: string | undefined;
exchange_options?: {
exclusive?: boolean | undefined;
autoDelete?: boolean | undefined;
} | undefined;
ipml_options?: {
defaultExchangeName?: string | undefined;
} | undefined
conn_options?: any;
}
export interface CallOptions {
correlationId?: string | undefined;
autoDeleteCallback?: any;
}
export interface HandlerOptions {
queueName?: string | undefined;
durable?: boolean | undefined;
exclusive?: boolean | undefined;
autoDelete?: boolean | undefined;
}
export interface BroadcastOptions {
ttl?: number | undefined;
onResponse?: any;
context?: any;
onComplete?: any;
}
export interface CommandInfo {
cmd?: string | undefined;
exchange?: string | undefined;
contentType?: string | undefined;
size?: number | undefined;
}
export interface Callback {
(...args: any[]): void;
}
export interface CallbackWithError {
(err: any, ...args: any[]): void;
}
export declare function factory(opt?: Options): amqpRPC;
export declare class amqpRPC {
constructor(opt?: Options);
generateQueueName(type: string): string;
disconnect(): void;
call<T>(cmd: string, params: T, cb?: Callback, context?: any, options?: CallOptions): string;
on<T>(cmd: string, cb: (param?: T, cb?: Callback, info?: CommandInfo) => void, context?: any, options?: HandlerOptions): boolean;
off(cmd: string): boolean;
callBroadcast<T>(cmd: string, params: T, options?: BroadcastOptions): void;
onBroadcast<T>(cmd: string, cb?: (params?: T, cb?: CallbackWithError) => void, context?: any, options?: any): boolean;
offBroadcast(cmd: string): boolean;
}
Additional Details
- Last updated: Wed, 07 Jul 2021 21:44:15 GMT
- Dependencies: @types/node
- Global values: none
Credits
These definitions were written by Wonshik Kim.
0.0.33
8 months ago
0.0.34
7 months ago
0.0.35
6 months ago
0.0.32
3 years ago
0.0.31
7 years ago
0.0.30
8 years ago
0.0.29
8 years ago
0.0.28-alpha
8 years ago
0.0.27-alpha
8 years ago
0.0.26-alpha
8 years ago
0.0.25-alpha
8 years ago
0.0.24-alpha
8 years ago
0.0.23-alpha
8 years ago
0.0.22-alpha
8 years ago
0.0.17-alpha
8 years ago
0.0.16-alpha
8 years ago