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

13 lines (12 loc) 568 B
import type { Fn } from '../../../../../@aileron/declare'; /** * Creates a function that runs the given function as a macrotask. * * If the function is called multiple times, it cancels the previous task and schedules a new task. * * @note Using setTimeout instead of MessageChannel-based setImmediate to avoid scheduling conflicts with React's internal Fiber scheduler * * @param handler - Function to run as a macrotask * @returns Function that cancels the previous task and schedules a new task */ export declare const afterMicrotask: (handler: Fn) => Fn;