UNPKG

@canard/schema-form

Version:

React-based component library that renders forms based on JSON Schema with plugin system support for validators and UI components

26 lines (25 loc) 815 B
import type { Fn } from '../../../../../@aileron/declare'; import type { NodeEvent } from '../../../type'; /** * Collects multiple events and publishes them as a single merged event * to prevent recursive event triggering and improve performance. */ export declare class EventCascade { private __currentBatch__; /** * Acquires the current event batch. If there is no batch, create a new one. * @returns Current event batch */ private __acquireBatch__; private __batchHandler__; /** * Creates an EventCascade instance. * @param batchHandler - Function to handle collected events */ constructor(batchHandler: Fn<[event: NodeEvent]>); /** * Adds an event to the batch. * @param event - Event to add */ schedule(event: NodeEvent): void; }