import type { Resource } from "webappwiz/disposable"; import type { AnyListener, Events, Listener, ListenerOptions, Unlisten } from "./events.js"; /** * Raises typed events. The owner keeps the dispatcher and calls `dispatch`; * everyone else gets `events` and can only listen. */ export declare class Dispatcher> implements Events, Resource { readonly events: Events; private scopedEntries; private universalEntries; private nextId; private nextOrder; on(type: K, listener: Listener, opts?: ListenerOptions): Unlisten; all(typeListener: AnyListener, opts?: ListenerOptions): Unlisten; dispatch(type: K, ...args: T[K] extends undefined ? [] : [event: T[K]]): void; dispose(): void; private off; }