diff --git a/packages/core/src/components/Edges/BaseEdge.ts b/packages/core/src/components/Edges/BaseEdge.ts index c1fd6972..d1df2977 100644 --- a/packages/core/src/components/Edges/BaseEdge.ts +++ b/packages/core/src/components/Edges/BaseEdge.ts @@ -1,5 +1,5 @@ import { isNumber } from '@vueuse/core' -import type { FunctionalComponent } from 'vue' +import type { Component, FunctionalComponent } from 'vue' import EdgeText from './EdgeText.vue' import type { BaseEdgeProps } from '~/types' @@ -41,7 +41,7 @@ const BaseEdge: FunctionalComponent = function ( }) : null, label && isNumber(labelX) && isNumber(labelY) - ? h(EdgeText, { + ? h(EdgeText as Component, { x: labelX, y: labelY, label, diff --git a/packages/core/src/components/Nodes/DefaultNode.ts b/packages/core/src/components/Nodes/DefaultNode.ts index ba0c9e37..5f8bcd54 100644 --- a/packages/core/src/components/Nodes/DefaultNode.ts +++ b/packages/core/src/components/Nodes/DefaultNode.ts @@ -1,4 +1,4 @@ -import type { FunctionalComponent } from 'vue' +import type { Component, FunctionalComponent } from 'vue' import Handle from '../Handle/Handle.vue' import type { NodeProps } from '~/types' import { Position } from '~/types' @@ -12,9 +12,9 @@ const DefaultNode: FunctionalComponent = function ({ isValidSourcePos, }) { return [ - h(Handle, { type: 'target', position: targetPosition, connectable, isValidConnection: isValidTargetPos }), + h(Handle as Component, { type: 'target', position: targetPosition, connectable, isValidConnection: isValidTargetPos }), typeof label !== 'string' && label ? h(label) : h('div', { innerHTML: label }), - h(Handle, { type: 'source', position: sourcePosition, connectable, isValidConnection: isValidSourcePos }), + h(Handle as Component, { type: 'source', position: sourcePosition, connectable, isValidConnection: isValidSourcePos }), ] } diff --git a/packages/core/src/components/Nodes/InputNode.ts b/packages/core/src/components/Nodes/InputNode.ts index 81fa52bc..b644a3a4 100644 --- a/packages/core/src/components/Nodes/InputNode.ts +++ b/packages/core/src/components/Nodes/InputNode.ts @@ -1,4 +1,4 @@ -import type { FunctionalComponent } from 'vue' +import type { Component, FunctionalComponent } from 'vue' import Handle from '../Handle/Handle.vue' import type { NodeProps } from '~/types' import { Position } from '~/types' @@ -11,7 +11,7 @@ const InputNode: FunctionalComponent = function ({ }) { return [ typeof label !== 'string' && label ? h(label) : h('div', { innerHTML: label }), - h(Handle, { type: 'source', position: sourcePosition, connectable, isValidConnection: isValidSourcePos }), + h(Handle as Component, { type: 'source', position: sourcePosition, connectable, isValidConnection: isValidSourcePos }), ] } diff --git a/packages/core/src/components/Nodes/OutputNode.ts b/packages/core/src/components/Nodes/OutputNode.ts index 5d677ffc..ea711d4b 100644 --- a/packages/core/src/components/Nodes/OutputNode.ts +++ b/packages/core/src/components/Nodes/OutputNode.ts @@ -1,4 +1,4 @@ -import type { FunctionalComponent } from 'vue' +import type { Component, FunctionalComponent } from 'vue' import Handle from '../Handle/Handle.vue' import type { NodeProps } from '~/types' import { Position } from '~/types' @@ -10,7 +10,7 @@ const OutputNode: FunctionalComponent = function ({ isValidTargetPos, }) { return [ - h(Handle, { type: 'target', position: targetPosition, connectable, isValidConnection: isValidTargetPos }), + h(Handle as Component, { type: 'target', position: targetPosition, connectable, isValidConnection: isValidTargetPos }), typeof label !== 'string' && label ? h(label) : h('div', { innerHTML: label }), ] }