diff --git a/.changeset/twenty-turkeys-rhyme.md b/.changeset/twenty-turkeys-rhyme.md new file mode 100644 index 00000000..2a5e909d --- /dev/null +++ b/.changeset/twenty-turkeys-rhyme.md @@ -0,0 +1,5 @@ +--- +'@reactflow/core': patch +--- + +Types: improve typing for node type diff --git a/packages/core/src/types/nodes.ts b/packages/core/src/types/nodes.ts index c27e79cf..a7ec9b2b 100644 --- a/packages/core/src/types/nodes.ts +++ b/packages/core/src/types/nodes.ts @@ -5,11 +5,11 @@ import { internalsSymbol } from '../utils'; import type { XYPosition, Position, CoordinateExtent, HandleElement } from '.'; // interface for the user node items -export type Node = { +export type Node = { id: string; position: XYPosition; data: T; - type?: string; + type?: U; style?: CSSProperties; className?: string; sourcePosition?: Position;