forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pubsub.d.ts
30 lines (22 loc) · 797 Bytes
/
pubsub.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
30
// Type definitions for PubSubJS 1.3.5
// Project: https://github.com/mroderick/PubSubJS
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module PubSubJS {
interface Base extends Publish, Subscribe, Unsubscribe {
version: string;
name: string;
}
interface Publish{
publish(message: any, data: any): boolean;
publish(message:any, data:any, sync:boolean, immediateExceptions:Function): boolean;
publishSync(message: any, data: any): boolean;
}
interface Subscribe{
subscribe(message: any, func: Function): any;
}
interface Unsubscribe{
unsubscribe(tokenOrFunction: any): any;
}
}
declare var PubSub: PubSubJS.Base;