diff --git a/src/utils/edgeUtils.ts b/src/utils/edgeUtils.ts index e9b7053..14a8c3a 100644 --- a/src/utils/edgeUtils.ts +++ b/src/utils/edgeUtils.ts @@ -191,9 +191,9 @@ function getNodeIntersection( ): { x: number; y: number; angle: number } { // Use positionAbsolute for correct positioning of nodes inside groups // positionAbsolute accounts for parent group offset, while position is relative - // @ts-ignore - internals.positionAbsolute exists at runtime but not in public types + // @ts-expect-error - internals.positionAbsolute exists at runtime but not in public types const intersectionNodePosition = intersectionNode.internals?.positionAbsolute ?? intersectionNode.position; - // @ts-ignore - internals.positionAbsolute exists at runtime but not in public types + // @ts-expect-error - internals.positionAbsolute exists at runtime but not in public types const targetPosition = targetNode.internals?.positionAbsolute ?? targetNode.position; // Use measured dimensions from React Flow (stored in node.measured) diff --git a/src/utils/handleMigration.ts b/src/utils/handleMigration.ts index a693865..f74fd33 100644 --- a/src/utils/handleMigration.ts +++ b/src/utils/handleMigration.ts @@ -18,12 +18,13 @@ const OLD_HANDLE_POSITIONS = ['top', 'right', 'bottom', 'left'] as const; export function migrateRelationHandles(relation: SerializedRelation): SerializedRelation { // Check if either handle uses old format const hasOldSourceHandle = - relation.sourceHandle != null && OLD_HANDLE_POSITIONS.includes(relation.sourceHandle as any); + relation.sourceHandle != null && OLD_HANDLE_POSITIONS.includes(relation.sourceHandle as typeof OLD_HANDLE_POSITIONS[number]); const hasOldTargetHandle = - relation.targetHandle != null && OLD_HANDLE_POSITIONS.includes(relation.targetHandle as any); + relation.targetHandle != null && OLD_HANDLE_POSITIONS.includes(relation.targetHandle as typeof OLD_HANDLE_POSITIONS[number]); // If old format detected, remove handle fields entirely for floating edge pattern if (hasOldSourceHandle || hasOldTargetHandle) { + // eslint-disable-next-line @typescript-eslint/no-unused-vars const { sourceHandle, targetHandle, ...relationWithoutHandles } = relation; return relationWithoutHandles; }