UNPKG

@gravity-ui/graph

Version:

Modern graph editor component

11 lines (10 loc) 666 B
import { Graph } from "../../graph"; import { GraphEventsDefinitions, UnwrapGraphEvents, UnwrapGraphEventsDetail } from "../../graphEvents"; import { ESchedulerPriority } from "../../lib"; import { TGraphEventCallbacks } from "../events"; export declare function useGraphEvent<Event extends keyof GraphEventsDefinitions>(graph: Graph | null, event: Event, cb: (data: UnwrapGraphEventsDetail<Event>, event: UnwrapGraphEvents<Event>) => void, debounceParams?: { priority?: ESchedulerPriority; frameInterval?: number; frameTimeout?: number; }): void; export declare function useGraphEvents(graph: Graph | null, events: Partial<TGraphEventCallbacks>): void;