@joint/react
Version:
React bindings and hooks for JointJS to build interactive diagrams and graphs.
14 lines (13 loc) • 675 B
TypeScript
import type { dia } from '@joint/core';
export interface SubscribeHandler {
readonly subscribe: (onStoreChange: (changedIds?: Set<dia.Cell.ID>) => void) => () => void;
readonly notifySubscribers: () => void;
}
/**
* Subscribe handler for managing subscribers and notifying them.
* This handler allows you to subscribe to changes and notify subscribers when changes occur.
* @param beforeSubscribe - Optional callback to be called before notifying subscribers.
* @returns - An object with subscribe and notifySubscribers methods.
* @group utils
*/
export declare function subscribeHandler(beforeSubscribe?: () => Set<dia.Cell.ID> | undefined): SubscribeHandler;