-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
56 lines (34 loc) · 1.71 KB
/
index.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Type definitions for PubSubDistinct
// Project: PubSubDistinct
// Definitions by: tomsa.md
/*~ If this module is a UMD module that exposes a global variable 'myClassLib' when
*~ loaded outside a module loader environment, declare that global here.
*~ Otherwise, delete this declaration.
*/
import {ReplaySubject} from 'rxjs/ReplaySubject'
import {Subscription} from 'rxjs/Subscription';
/*~ This declaration specifies that the class constructor function
*~ is the exported object from the file
*/
/*~ If you want to expose types from your module as well, you can
*~ place them in this block.
*/
declare class PubSubDistinct {
protected static events: any;
static publish(eventName: string, data: any, previousMessagesNr?: number, saveHash?: boolean): void;
static publishDistinct(eventName: string, data: any, previousMessagesNr?: number): void;
static subscribe(eventName: string, callback: (data?: any) => any, previousMessagesNr?: number): Subscription;
static subscribeOnce(eventName: string, callback: (data?: any) => any): Subscription|boolean;
static unsubscribe(subscriber: any): void;
static unsubscribeAll(subscribers: Subscription[]): void;
static dispose(eventName: string): void;
static hasSubscribers(eventName: string): boolean;
static getEvents(): any;
static getSubjects(): any;
static getSubjectByEventName(eventName: string, previousMessagesNr: number): ReplaySubject<any>;
static isCallback(callback: (data?: any) => any): boolean;
static setHashToEvent(eventName: string, dataHash: string): void;
static getEventHash(eventName: string): string|boolean;
static getDataHash(data: any): string;
}
export {PubSubDistinct, Subscription};