From ae585d136e34c9e9ad9d45f75c059bc5367e73ae Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Sun, 6 Apr 2025 15:46:49 +0200 Subject: [PATCH] Improve TSDoc comments for `BaseEdgeProps` --- .changeset/eighty-foxes-add.md | 5 +++++ packages/react/src/types/edges.ts | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .changeset/eighty-foxes-add.md diff --git a/.changeset/eighty-foxes-add.md b/.changeset/eighty-foxes-add.md new file mode 100644 index 00000000..4f781949 --- /dev/null +++ b/.changeset/eighty-foxes-add.md @@ -0,0 +1,5 @@ +--- +'@xyflow/react': patch +--- + +Improve TSDoc comments for `BaseEdgeProps` diff --git a/packages/react/src/types/edges.ts b/packages/react/src/types/edges.ts index 9d601037..ca3f91fe 100644 --- a/packages/react/src/types/edges.ts +++ b/packages/react/src/types/edges.ts @@ -148,7 +148,7 @@ export type EdgeProps = Pick< * @public * @expand */ -export type BaseEdgeProps = Omit, 'd' | 'path'> & +export type BaseEdgeProps = Omit, 'd' | 'path' | 'markerStart' | 'markerEnd'> & EdgeLabelOptions & { /** * The width of the invisible area around the edge that the user can interact with. This is @@ -166,6 +166,16 @@ export type BaseEdgeProps = Omit, 'd' | 'path'> & * be used to generate this string for you. */ path: string; + /** + * The id of the SVG marker to use at the start of the edge. This should be defined in a + * `` element in a separate SVG document or element. + */ + markerStart?: string; + /** + * The id of the SVG marker to use at the end of the edge. This should be defined in a `` + * element in a separate SVG document or element. + */ + markerEnd?: string; }; /**