-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathemitter.d.ts
More file actions
46 lines (44 loc) · 2.44 KB
/
Copy pathemitter.d.ts
File metadata and controls
46 lines (44 loc) · 2.44 KB
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
/// <reference types="node" />
import { EventEmitter } from 'events';
export declare interface SequentialEventEmitterBase {
emit(event: string | symbol, ...args: any[]): any;
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
on(event: string | symbol, listener: (...args: any[]) => void): this;
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
removeAllListeners(event?: string | symbol): this;
setMaxListeners(n: number): this;
getMaxListeners(): number;
listenerCount(type: string | symbol): number;
once(event: string | symbol, listener: (...args: any[]) => void): this;
subscribe(event: string | symbol, asyncListener: (...args: any[]) => Promise<void>): this;
unsubscribe(event: string | symbol, asyncListener: (...args: any[]) => Promise<void>): this;
subscribeOnce(event: string | symbol, asyncListener: (...args: any[]) => Promise<void>): this;
next(event: string | symbol, ...args: any[]): Promise<void>;
}
/**
* @class
* @extends EventEmitter
*/
export declare class SequentialEventEmitter extends EventEmitter implements SequentialEventEmitterBase {
/**
* @constructor
*/
constructor();
emit(event: string | symbol, ...args: any[]): any;
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
on(event: string | symbol, listener: (...args: any[]) => void): this;
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
removeAllListeners(event?: string | symbol): this;
setMaxListeners(n: number): this;
getMaxListeners(): number;
listenerCount(type: string | symbol): number;
once(event: string | symbol, listener: (...args: any[]) => void): this;
subscribe(event: string | symbol, asyncListener: (...args: any[]) => Promise<void>): this;
unsubscribe(event: string | symbol, asyncListener: (...args: any[]) => Promise<void>): this;
subscribeOnce(event: string | symbol, asyncListener: (...args: any[]) => Promise<void>): this;
next(event: string | symbol, ...args: any[]): Promise<void>;
}