From 5093213116afab80c6f07a149d343aa415534bad Mon Sep 17 00:00:00 2001 From: moklick Date: Tue, 7 May 2024 14:47:47 +0200 Subject: [PATCH] chore(react): udpate return type of fixedForwardRef function --- packages/react/src/utils/general.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react/src/utils/general.ts b/packages/react/src/utils/general.ts index e497dd99..04608f74 100644 --- a/packages/react/src/utils/general.ts +++ b/packages/react/src/utils/general.ts @@ -1,4 +1,4 @@ -import { ReactNode, Ref, RefAttributes, forwardRef } from 'react'; +import { type Ref, type RefAttributes, forwardRef } from 'react'; import { isNodeBase, isEdgeBase } from '@xyflow/system'; import type { Edge, Node } from '../types'; @@ -25,8 +25,8 @@ export const isEdge = (element: unknown): element // eslint-disable-next-line @typescript-eslint/ban-types export function fixedForwardRef( - render: (props: P, ref: Ref) => ReactNode -): (props: P & RefAttributes) => ReactNode { + render: (props: P, ref: Ref) => JSX.Element +): (props: P & RefAttributes) => JSX.Element { // eslint-disable-next-line @typescript-eslint/no-explicit-any return forwardRef(render) as any; }