import type { PluginKey } from '@atlaskit/editor-prosemirror/state'; export interface Listeners { [name: string]: Set; } export type Listener = (data: T) => void; type EventName = PluginKey | string; export type Dispatch = (eventName: EventName, data: T) => void; export declare class EventDispatcher { private listeners; on(event: string, cb: Listener): void; has(event: string, cb: Listener): boolean; off(event: string, cb: Listener): void; emit(event: string, data: T): void; destroy(): void; } /** * Creates a dispatch function that can be called inside ProseMirror Plugin * to notify listeners about that plugin's state change. */ export declare function createDispatch(eventDispatcher: EventDispatcher): Dispatch; export {};