From f308edbfa6cc8b315363e4dae79c4e303cd39503 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Bruhn Date: Fri, 10 Oct 2025 22:20:47 +0200 Subject: [PATCH] fix: replace any types with explicit function signatures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace TypeScript 'any' types with explicit function signatures to fix ESLint errors. This improves type safety for the onAddNodeRequest callback. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/App.tsx | 2 +- src/components/Editor/GraphEditor.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 5c877ca..913c777 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -173,7 +173,7 @@ function AppContent() { setSelectedNode(null); } }} - onAddNodeRequest={(callback: any) => setAddNodeCallback(() => callback)} + onAddNodeRequest={(callback: (nodeTypeId: string, position?: { x: number; y: number }) => void) => setAddNodeCallback(() => callback)} /> diff --git a/src/components/Editor/GraphEditor.tsx b/src/components/Editor/GraphEditor.tsx index 18ca03e..439b00e 100644 --- a/src/components/Editor/GraphEditor.tsx +++ b/src/components/Editor/GraphEditor.tsx @@ -503,7 +503,7 @@ const GraphEditor = ({ onNodeSelect, onEdgeSelect, onAddNodeRequest }: GraphEdit // Call the onAddNodeRequest callback if provided useEffect(() => { if (onAddNodeRequest) { - onAddNodeRequest(handleAddNode as any); + onAddNodeRequest(handleAddNode); } }, [onAddNodeRequest, handleAddNode]);