Skip to content

Commit cab676f

Browse files
authored
update sequential event emitter (#152)
* update sequential event emitter * 2.10.2
1 parent 53e4553 commit cab676f

File tree

3 files changed

+19
-537
lines changed

3 files changed

+19
-537
lines changed

emitter.d.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,24 @@ export declare interface SequentialEventEmitterBase {
2323
* @class
2424
* @extends EventEmitter
2525
*/
26-
export declare class SequentialEventEmitter implements SequentialEventEmitterBase extends EventEmitter {
26+
export declare class SequentialEventEmitter extends EventEmitter implements SequentialEventEmitterBase {
2727
/**
2828
* @constructor
2929
*/
3030
constructor();
31+
emit(event: string | symbol, ...args: any[]): any;
32+
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
33+
on(event: string | symbol, listener: (...args: any[]) => void): this;
34+
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
35+
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
36+
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
37+
removeAllListeners(event?: string | symbol): this;
38+
setMaxListeners(n: number): this;
39+
getMaxListeners(): number;
40+
listenerCount(type: string | symbol): number;
41+
once(event: string | symbol, listener: (...args: any[]) => void): this;
42+
subscribe(event: string | symbol, asyncListener: (...args: any[]) => Promise<void>): this;
43+
unsubscribe(event: string | symbol, asyncListener: (...args: any[]) => Promise<void>): this;
44+
subscribeOnce(event: string | symbol, asyncListener: (...args: any[]) => Promise<void>): this;
45+
next(event: string | symbol, ...args: any[]): Promise<void>;
3146
}

0 commit comments

Comments
 (0)