refactor: make nodes/edges for useStates helpers optional

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent a9e7eb31ea
commit 35165c3a98
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -124,7 +124,7 @@ export interface FlowProps<N = any, E = N> {
export type FlowOptions<N = any, E = N> = FlowProps<N, E>
export interface UseNodesStateOptions<Data = any> {
nodes: Node<Data>[]
nodes?: Node<Data>[]
options?: Pick<
FlowOptions<Data, any>,
| 'applyDefault'
@@ -141,7 +141,7 @@ export interface UseNodesStateOptions<Data = any> {
>
}
export interface UseEdgesStateOptions<Data = any> {
edges: Edge<Data>[]
edges?: Edge<Data>[]
options?: Pick<
FlowOptions<any, Data>,
| 'applyDefault'