update: types

* Add elements to flowoptions type
* add window interface to custom shims
This commit is contained in:
Braks
2021-10-21 00:24:59 +02:00
parent 31c896edb5
commit 77d2e01fc0
6 changed files with 20 additions and 13 deletions
+3 -2
View File
@@ -91,6 +91,7 @@ export type OnLoadParams<T = any> = {
export type OnLoadFunc<T = any> = (params: OnLoadParams<T>) => void
export interface FlowOptions extends Omit<HTMLAttributes, 'onLoad'> {
elements: Elements
nodeTypes?: Record<string, NodeType>
edgeTypes?: Record<string, EdgeType>
connectionMode?: ConnectionMode
@@ -123,6 +124,6 @@ export interface FlowOptions extends Omit<HTMLAttributes, 'onLoad'> {
panOnScrollMode?: PanOnScrollMode
zoomOnDoubleClick?: boolean
edgeUpdaterRadius?: number
// nodeTypesId?: string
// edgeTypesId?: string / used by react-flow to detect a re-render of node components
nodeTypesId?: string
edgeTypesId?: string
}