refacotr(types): add group node to BuiltInNode type

This commit is contained in:
moklick
2024-12-04 13:07:05 +01:00
parent ce8c2cf7a6
commit a666888a1e
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -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>;
+3 -1
View File
@@ -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 };