diff --git a/packages/react/src/components/Handle/index.tsx b/packages/react/src/components/Handle/index.tsx index 362027ab..36778039 100644 --- a/packages/react/src/components/Handle/index.tsx +++ b/packages/react/src/components/Handle/index.tsx @@ -22,7 +22,7 @@ import { useStore, useStoreApi } from '../../hooks/useStore'; import { useNodeId } from '../../contexts/NodeIdContext'; import { type ReactFlowState } from '../../types'; -export type HandleComponentProps = HandleProps & Omit, 'id'>; +export interface HandleComponentProps extends HandleProps, Omit, 'id'> {} const selector = (s: ReactFlowState) => ({ connectOnClick: s.connectOnClick, @@ -221,4 +221,7 @@ const HandleComponent = forwardRef( HandleComponent.displayName = 'Handle'; +/** + * The Handle component is the part of a node that can be used to connect nodes. + */ export const Handle = memo(HandleComponent); diff --git a/packages/react/src/types/component-props.ts b/packages/react/src/types/component-props.ts index 213b9d8c..50f07303 100644 --- a/packages/react/src/types/component-props.ts +++ b/packages/react/src/types/component-props.ts @@ -50,7 +50,7 @@ import type { * ReactFlow component props. * @public */ -export type ReactFlowProps = Omit, 'onError'> & { +export interface ReactFlowProps extends Omit, 'onError'> { /** An array of nodes to render in a controlled flow. * @example * const nodes = [ @@ -502,6 +502,6 @@ export type ReactFlowProps = Omit, 'onError'> & { * @example 'system' | 'light' | 'dark' */ colorMode?: ColorMode; -}; +} export type ReactFlowRefType = HTMLDivElement; diff --git a/packages/svelte/src/lib/components/Handle/Handle.svelte b/packages/svelte/src/lib/components/Handle/Handle.svelte index 212efe56..87b6c9d2 100644 --- a/packages/svelte/src/lib/components/Handle/Handle.svelte +++ b/packages/svelte/src/lib/components/Handle/Handle.svelte @@ -126,6 +126,10 @@ // @todo implement connectablestart, connectableend +