From 199c76a3c089e13961f28742ec80750f6bbaf3c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Diamond?= <32074058+Andre-Diamond@users.noreply.github.com> Date: Mon, 24 Feb 2025 10:58:50 +0200 Subject: [PATCH] refactor: Add type annotations to debounced functions for improved type safety --- components/SelectTags.tsx | 2 +- components/SummaryTemplate.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/SelectTags.tsx b/components/SelectTags.tsx index 8c1ac94..8796cb8 100644 --- a/components/SelectTags.tsx +++ b/components/SelectTags.tsx @@ -26,7 +26,7 @@ const SelectTags: React.FC = ({ onSelect, initialValue, type }) }, [initialValue]); const debouncedHandleInputChange = useMemo( - () => debounce(async (selected) => { + () => debounce(async (selected: any) => { setSelectedLabels(selected); // Update local state const labs: string[] = selected.map((item: any) => item.label); const status = await saveNewTags(labs, type); diff --git a/components/SummaryTemplate.tsx b/components/SummaryTemplate.tsx index 5b5f59f..1e3e308 100644 --- a/components/SummaryTemplate.tsx +++ b/components/SummaryTemplate.tsx @@ -126,7 +126,7 @@ const SummaryTemplate = ({ updateMeetings }: SummaryTemplateProps) => { // Debounced auto-save logic const debouncedAutoSave = useMemo( - () => debounce(async (latestData) => { + () => debounce(async (latestData: any) => { await autoSave(latestData); }, 1000), []