Skip to content

events

Common types used by APIs that dispatch events.

Types

events.Event

API event type.

interface Event<T extends (...args: any[]) => any> {
removeListener(callback: T): void;
addListener(callback: T): () => void;
}