forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pubsub.d.ts
39 lines (28 loc) · 954 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
31
32
33
34
35
36
37
38
39
// Type definitions for PubSubJS 1.5.2
// 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, ClearAllSubscriptions {
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;
}
interface ClearAllSubscriptions{
clearAllSubscriptions(): any;
}
}
declare var PubSub: PubSubJS.Base;
declare module "pubsub-js" {
export = PubSub;
}