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) 946 B
import type { Fn } from '../../../../../@aileron/declare'; import type { NodeEventCollection, NodeEventEntity, NodeEventType } from '../../../../../core/nodes/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__; private __batchHandler__; /** * Creates an EventCascade instance. * @param batchHandler - Function to handle collected events */ constructor(batchHandler: Fn<[eventCollection: NodeEventCollection]>); /** * Adds an event to the batch. * @param eventEntity - Event to add */ schedule<Type extends NodeEventType>(eventEntity: NodeEventEntity<Type>): void; /** * Acquires the current event batch. If there is no batch, create a new one. * @returns Current event batch */ private __acquireBatch__; }