refacotr(types): add group node to BuiltInNode type
This commit is contained in:
@@ -56,6 +56,8 @@ export type NodeWrapperProps<NodeType extends Node> = {
|
||||
nodeClickDistance?: number;
|
||||
};
|
||||
|
||||
export type BuiltInNode = Node<{ label: string }, 'input' | 'output' | 'default'>;
|
||||
export type BuiltInNode =
|
||||
| Node<{ label: string }, 'input' | 'output' | 'default'>
|
||||
| Node<Record<string, never>, 'group'>;
|
||||
|
||||
export type NodeProps<NodeType extends Node = Node> = NodePropsBase<NodeType>;
|
||||
|
||||
@@ -44,7 +44,9 @@ export type NodeTypes = Record<
|
||||
|
||||
export type DefaultNodeOptions = Partial<Omit<Node, 'id'>>;
|
||||
|
||||
export type BuiltInNode = Node<{ label: string }, 'input' | 'output' | 'default'>;
|
||||
export type BuiltInNode =
|
||||
| Node<{ label: string }, 'input' | 'output' | 'default'>
|
||||
| Node<Record<string, never>, 'group'>;
|
||||
|
||||
export type NodeEventMap = {
|
||||
nodeclick: { node: Node; event: MouseEvent | TouchEvent };
|
||||
|
||||
Reference in New Issue
Block a user