mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-30 18:43:21 +08:00
27 lines
923 B
TypeScript
27 lines
923 B
TypeScript
// Type definitions for vertx3-eventbus-client 3.4
|
|
// Project: http://vertx.io
|
|
// Definitions by: Odd Eirik Nes <https://github.com/oddeirik>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
declare namespace EventBus {
|
|
interface EventBusStatic {
|
|
new(url: string, options?: any): EventBus;
|
|
}
|
|
|
|
interface EventBus {
|
|
url: string;
|
|
options?: any;
|
|
onopen(): any;
|
|
onerror(error: Error): any;
|
|
onclose(): any;
|
|
registerHandler(address: string, headers: any, callback: (error: Error, message: any) => any): any;
|
|
unregisterHandler(address: string, headers: any, callback: (error: Error, message: any) => any): any;
|
|
send(address: string, message: any, headers: any, callback?: (error: Error, message: any) => any): any;
|
|
publish(address: string, message: any, headers?: any): any;
|
|
close(): any;
|
|
}
|
|
}
|
|
|
|
declare var EventBus: EventBus.EventBusStatic;
|
|
export = EventBus;
|