From a559132671d9cb545e0b6799b3c77ea3815e0a53 Mon Sep 17 00:00:00 2001 From: Maximilian Harz Date: Thu, 20 Feb 2025 19:38:31 +0100 Subject: [PATCH] Improve typing of itemsApi --- src/Components/Map/hooks/useItems.tsx | 1 - src/types/LayerProps.d.ts | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Components/Map/hooks/useItems.tsx b/src/Components/Map/hooks/useItems.tsx index bf8779fe..0fb1af78 100644 --- a/src/Components/Map/hooks/useItems.tsx +++ b/src/Components/Map/hooks/useItems.tsx @@ -82,7 +82,6 @@ function useItemsManager(initialItems: Item[]): { }, }) result.map((item) => { - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment dispatch({ type: 'ADD', item: { ...item, layer } }) return null }) diff --git a/src/types/LayerProps.d.ts b/src/types/LayerProps.d.ts index 44f55a95..9c720bc4 100644 --- a/src/types/LayerProps.d.ts +++ b/src/types/LayerProps.d.ts @@ -18,8 +18,7 @@ export interface LayerProps { markerShape: string markerDefaultColor: string markerDefaultColor2?: string - // eslint-disable-next-line @typescript-eslint/no-explicit-any - api?: ItemsApi + api?: ItemsApi itemType: ItemType userProfileLayer?: boolean customEditLink?: string