import type { AgEvent } from './agEvent'; import type { BaseEvents } from './baseEvents'; export type AgEventServiceGlobalListener = (eventType: TEventType, event: TGlobalEvents[TEventType] & AgEvent) => void; export type AgEventServiceListener = (params: TGlobalEvents[TEventType]) => void; /** @internal AG_GRID_INTERNAL - Not for public use. Can change / be removed at any time. */ export type WithoutCommon = Omit; export type AgRawEvents = { [K in keyof TGlobalEvents]: WithoutCommon; }[keyof TGlobalEvents]; /** @internal AG_GRID_INTERNAL - Not for public use. Can change / be removed at any time. */ export interface AgEventService { readonly eventServiceType: 'global'; readonly beanName: 'eventSvc'; addListener(eventType: TEventType, listener: AgEventServiceListener, async?: boolean): void; removeListener(eventType: TEventType, listener: AgEventServiceListener, async?: boolean): void; addGlobalListener(listener: AgEventServiceGlobalListener, async?: boolean): void; removeGlobalListener(listener: AgEventServiceGlobalListener, async?: boolean): void; dispatchEvent(event: AgRawEvents | BaseEvents[keyof BaseEvents]): void; dispatchEventOnce(event: AgRawEvents | BaseEvents[keyof BaseEvents]): void; }