import { Binding, BindingOptions } from "./Binding"; import { Cluster } from "./Cluster"; import { QueueOrExchange } from "./index"; import { Queue } from "./Queue"; export declare type ExchangeType = "direct" | "topic" | "fanout" | "x-consistent-hash"; export interface ExchangeArguments { [field: string]: string; } export interface ExchangeDefinition extends QueueOrExchange { type: ExchangeType; arguments: ExchangeArguments; } export declare class Exchange implements ExchangeDefinition { name: string; type: ExchangeType; vhost: string; durable: boolean; auto_delete: boolean; arguments: ExchangeArguments; private cluster?; constructor(name: string, type: ExchangeType, opts?: Partial); setCluster(cluster: Cluster): void; static fromDefinition(def: ExchangeDefinition): Exchange; toDefinition(): ExchangeDefinition; bindTo(destination: Queue | Exchange, opts?: BindingOptions): Binding; }