/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import Event from './Event'; import { EVENT_TARGET_GET_THE_PARENT_KEY, INTERNAL_DISPATCH_METHOD_KEY } from './internals/EventTargetInternals'; export type EventCallback = (event: Event) => void; export type EventHandler = { handleEvent(event: Event): void; }; export type EventListener = EventCallback | EventHandler; export type EventListenerOptions = Readonly<{ capture?: boolean; }>; export type AddEventListenerOptions = Readonly<{ capture?: boolean; passive?: boolean; once?: boolean; signal?: AbortSignal; }>; export default class EventTarget { addEventListener(type: string, callback: EventListener | null, optionsOrUseCapture?: AddEventListenerOptions | boolean): void; removeEventListener(type: string, callback: EventListener | null, optionsOrUseCapture?: EventListenerOptions | boolean): void; dispatchEvent(event: Event): boolean; [EVENT_TARGET_GET_THE_PARENT_KEY](): EventTarget | null; [INTERNAL_DISPATCH_METHOD_KEY](event: Event): void; } //# sourceMappingURL=EventTarget.d.ts.map