import type { Emitter } from '../../types'; import { diagnostics } from '../logger'; declare const ONCE: unique symbol; /** * An event emitter that emits events in the order they are received. * If an event is emitted while another event is being emitted, the new event * will be queued and emitted after the current event is finished. */ export declare class SerialEmitter implements Emitter { #private; protected readonly _log: typeof diagnostics; protected readonly _listeners: Map; constructor(name?: string, shouldLog?: boolean); on(type: E['type'] | '*', listener: Function & { [ONCE]?: true; }): this; once(type: E['type'] | '*', listener: Function): this; off(type: E['type'] | '*', listener: Function & { [ONCE]?: true; }): this; emit(nextEvent: Event): void; protected _getListeners(type: Event['type']): Function[]; } export {};