refactor(types): use types for prop type functions

This commit is contained in:
moklick
2020-05-15 21:53:13 +02:00
parent b887568ac8
commit 1e447a204c
8 changed files with 32 additions and 36 deletions
+4 -4
View File
@@ -13,14 +13,14 @@ import useGlobalKeyHandler from '../../hooks/useGlobalKeyHandler';
import useElementUpdater from '../../hooks/useElementUpdater';
import { getDimensions } from '../../utils';
import { fitView, zoomIn, zoomOut } from '../../utils/graph';
import { Elements, NodeTypesType, EdgeTypesType, GridType, OnLoadFunc } from '../../types';
import { Elements, NodeTypesType, EdgeTypesType, GridType, OnLoadFunc, Node, Edge, Connection } from '../../types';
export interface GraphViewProps {
elements: Elements;
onElementClick: () => void;
onElementClick: (element: Node | Edge) => void;
onElementsRemove: (elements: Elements) => void;
onNodeDragStop: () => void;
onConnect: () => void;
onNodeDragStop: (node: Node) => void;
onConnect: (conneciton: Connection) => void;
onLoad: OnLoadFunc;
onMove: () => void;
selectionKeyCode: number;