mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
Create cometd.d.ts
This commit is contained in:
28
cometd/cometd.d.ts
vendored
Normal file
28
cometd/cometd.d.ts
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
// Type definitions for CometD 2.5.1
|
||||
// Project: http://cometd.org
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user