import { DelegateEvent } from './event.ts'; /** * @deprecated Use `pierce` instead. * Dispatches a custom event to the specified destination. * @param destination - The target to dispatch the event to. * @param eventName - The name of the event to be dispatched. * @param ev - The native event or DelegateEvent instance that triggered the dispatch. * @param [data] - Optional data to be included in the event detail. */ export declare const dispatch: (destination: EventTarget, eventName: string, ev: Event | DelegateEvent, data?: unknown) => void; /** * Pierces an event through shadow DOM boundaries by dispatching a custom event to the specified destination. * @param destination - The target to pierce the event to. * @param ev - The native event or DelegateEvent instance to be pierced. * @param [data] - Optional data to be included in the event detail. */ export declare const pierce: (destination: HTMLElement, ev: Event | DelegateEvent, data?: unknown) => void; /** * Debounce function to limit the rate at which a function can fire. * @param handler - The function to be debounced, typically an EventListener or DelegateEventListener. * @param delay - The time in milliseconds to wait before executing the function after the last call. * @returns A debounced function that can be called with an Event object. */ export declare const debounce: (handler: (this: This, ev: Arg) => void, delay: number) => (this: This, ev: Arg) => void; /** * Throttle function to limit the execution of a function to once every specified interval. * @param handler - The function to be throttled, typically an EventListener or DelegateEventListener. * @param interval - The time in milliseconds to wait before allowing the function to be called again. * @returns A throttled function that can be called with an Event object. */ export declare const throttle: (handler: (this: This, ev: Arg) => void, interval: number) => (this: This, ev: Arg) => void;