feat(types): Add NodeTypes and EdgeTypes
* Interface for passing an object of NodeTypes/EdgeTypes * Object needs to be passed with components markedRaw Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
+3
-2
@@ -1,4 +1,4 @@
|
||||
import { DefineComponent } from 'vue'
|
||||
import { Component, DefineComponent } from 'vue'
|
||||
import { XYPosition, ElementId, Position } from './types'
|
||||
|
||||
export interface Node<T = any> {
|
||||
@@ -58,4 +58,5 @@ export interface NodeProps<T = any> {
|
||||
dragging?: boolean
|
||||
}
|
||||
|
||||
export type NodeType = DefineComponent<NodeProps, any, any, any, any> | boolean
|
||||
export type NodeType = Component<NodeProps> | DefineComponent<NodeProps, any, any, any, any> | boolean
|
||||
export type NodeTypes = Record<string, NodeType>
|
||||
|
||||
Reference in New Issue
Block a user