forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cometd.d.ts
29 lines (23 loc) · 984 Bytes
/
cometd.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Type definitions for CometD 2.5.1
// Project: http://cometd.org
// Definitions by: Derek Cicerone <https://github.com/derekcicerone>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module CometD {
var onListenerException: (exception: any, subscriptionHandle: any, isListener: boolean, message: string) => void;
function init(options: ConfigurationOptions): void;
function addListener(channel: string, listener: (message: any) => void): void;
function removeListener(listener: (message: any) => void): void;
function publish(channel: string, message: any): void;
interface ConfigurationOptions {
url: string;
logLevel?: string;
maxConnections?: number;
backoffIncrement?: number;
maxBackoff?: number;
reverseIncomingExtensions?: boolean;
maxNetworkDelay?: number;
requestHeaders?: any;
appendMessageTypeToURL?: boolean;
autoBatch?: boolean;
}
}