ethers.js/packages/properties/lib/events.d.ts

20 lines
881 B
TypeScript
Raw Permalink Normal View History

2022-04-11 17:14:19 -04:00
export declare type Listener = (...args: Array<any>) => void;
export interface EventEmitterable<T> {
on(event: T, listener: Listener): Promise<this>;
once(event: T, listener: Listener): Promise<this>;
emit(event: T, ...args: Array<any>): Promise<boolean>;
listenerCount(event?: T): Promise<number>;
listeners(event?: T): Promise<Array<Listener>>;
off(event: T, listener?: Listener): Promise<this>;
removeAllListeners(event?: T): Promise<this>;
addListener(event: T, listener: Listener): Promise<this>;
removeListener(event: T, listener: Listener): Promise<this>;
}
export declare class EventPayload<T> {
#private;
readonly filter: T;
readonly emitter: EventEmitterable<T>;
constructor(emitter: EventEmitterable<T>, listener: null | Listener, filter: T);
removeListener(): Promise<void>;
}
//# sourceMappingURL=events.d.ts.map