/** * @import {ValueIsEvent, ITypedEventTarget, TypedEventListenerOrEventListenerObject} from './types.js' */ /** * @template {ValueIsEvent} M * @implements {ITypedEventTarget} */ export class TypedEventTarget> extends EventTarget implements ITypedEventTarget { constructor(); /** * Dispatches a synthetic event to target and returns true if either * event's cancelable attribute value is false or its preventDefault() method * was not invoked, and false otherwise. * * @template {keyof M} T * @param {T} _type * @param {M[T]} event * @returns {boolean} */ dispatchTypedEvent(_type: T, event: M[T]): boolean; emit(...args: M[T]["detail"] extends import("iso-base/types").IsAny ? [type: T, detail?: unknown] : [type: T, detail: M[T]["detail"]]): boolean; /** * @inheritdoc {ITypedEventTarget['addEventListener']} * @template {keyof M & string} T * @param {T} type * @param {TypedEventListenerOrEventListenerObject | null} callback * @param {boolean | AddEventListenerOptions} [options] */ addEventListener(type: T, callback: TypedEventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void; /** * Alias for {@link TypedEventTarget.addEventListener} * * @template {keyof M & string} T * @param {T} type * @param {TypedEventListenerOrEventListenerObject | null} callback * @param {boolean | AddEventListenerOptions} [options] */ on(type: T, callback: TypedEventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void; /** * @inheritdoc {ITypedEventTarget['removeEventListener']} * @template {keyof M & string} T * @param {T} type * @param {TypedEventListenerOrEventListenerObject | null} callback * @param {boolean | EventListenerOptions} [options] */ removeEventListener(type: T, callback: TypedEventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions): void; /** * Alias for {@link TypedEventTarget.removeEventListener} * * @template {keyof M & string} T * @param {T} type * @param {TypedEventListenerOrEventListenerObject | null} callback * @param {boolean | EventListenerOptions} [options] */ off(type: T, callback: TypedEventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions): void; } import type { ValueIsEvent } from './types.js'; import type { ITypedEventTarget } from './types.js'; import type { TypedEventListenerOrEventListenerObject } from './types.js'; //# sourceMappingURL=index.d.ts.map