import { DbSchema } from '../schema.js';
export type EventMap = {
    schema: DbSchema;
    info: string;
};
export type Event = keyof EventMap;
export type Listener<T> = (data: T) => void;
export declare class Emitter {
    listeners: {
        [E in Event]?: Listener<EventMap[E]>[];
    };
    emit<E extends Event>(type: E, val: EventMap[E]): void;
    on<E extends Event>(type: E, fn: Listener<EventMap[E]>): void;
    removeAllListeners(): void;
    once<E extends Event>(type: E): Promise<EventMap[E]>;
    once<E extends Event>(type: E, fn: Listener<EventMap[E]>): void;
    off<E extends Event>(type: E, fn?: Listener<EventMap[E]>): void;
}
