//#region src/event/target.d.ts /** * Event target utils * * @example * ```ts * import { waitOnce } from '@kazupon/jts-utils/event/target' * ``` * * @module event/target */ /** * @license MIT * @author kazuya kawaguchi (a.k.a. kazupon) */ /** * Event Stop handler */ interface EventTargetStopHandler extends Disposable { (): void; } /** * Attach an event listener to the target * * @typeParam T - The type of the target * * @param _target - The event target * @param _type - The event type * @param _listenerOrOptions - An optional event listener or {@link AddEventListenerOptions} * @param _options - An optional {@link AddEventListenerOptions} * @returns A handler to stop the event listener */ declare function on(_target: T, _type: string, _listenerOrOptions?: EventListener | AddEventListenerOptions, _options?: AddEventListenerOptions): EventTargetStopHandler; /** * Detach an event listener from the target * * @param _target - The event target * @param _type - The event type * @param _listenerOrOptions - An optional event listener or {@link AddEventListenerOptions} * @param _options - An optional {@link AddEventListenerOptions} */ declare function off(_target: T, _type: string, _listenerOrOptions?: EventListener | AddEventListenerOptions, _options?: AddEventListenerOptions): void; //#endregion export { EventTargetStopHandler, off, on };