refactor(react): cleanup types

This commit is contained in:
moklick
2023-10-23 16:01:49 +02:00
parent 52a47a7a26
commit 13f274b1db
2 changed files with 2 additions and 5 deletions

View File

@@ -42,7 +42,7 @@ import type {
EdgeMouseHandler,
} from '.';
export type ReactFlowProps = HTMLAttributes<HTMLDivElement> & {
export type ReactFlowProps = Omit<HTMLAttributes<HTMLDivElement>, 'onError'> & {
nodes?: Node[];
edges?: Edge[];
defaultNodes?: Node[];

View File

@@ -42,10 +42,7 @@ export type OnSelectionChangeFunc = (params: OnSelectionChangeParams) => void;
export type FitViewParams = FitViewParamsBase<Node>;
export type FitViewOptions = FitViewOptionsBase<Node>;
export type FitView = (fitViewOptions?: FitViewOptions) => boolean;
export type OnInit<NodeData = any, EdgeData = any> = (
reactFlowInstance: ReactFlowInstance<NodeData, EdgeData>,
{ nodes, edges }: { nodes: Node<NodeData>[]; edges: Edge<EdgeData>[] }
) => void;
export type OnInit<NodeData = any, EdgeData = any> = (reactFlowInstance: ReactFlowInstance<NodeData, EdgeData>) => void;
export type ViewportHelperFunctions = {
zoomIn: ZoomInOut;