From 83c497139f0f417be8454296d4784478fcb6e61b Mon Sep 17 00:00:00 2001 From: Fabrizio Bertoglio Date: Fri, 29 Aug 2025 09:32:46 +0200 Subject: [PATCH] refactor: refine favorites tuple type --- src/types/types.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/types/types.ts b/src/types/types.ts index 3df7aef..07b37fe 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -5,6 +5,7 @@ import { import {AnimatedProp, PathDef} from '@shopify/react-native-skia'; import {StyleProp, ViewStyle, ViewToken} from 'react-native'; import {SharedValue} from 'react-native-reanimated'; +import {Dispatch, SetStateAction} from 'react'; // A common interface for paginated API responses. export interface PaginatedResponse { @@ -124,7 +125,7 @@ export type ViewableItemsType = { export type MaybeArray = ArrayLike | null | undefined; // Type for favorites (Consider refining the updater function's type). -export type FavoritesType = [Awaited, (args: any) => any]; +export type FavoritesType = [Media[], Dispatch>]; // Function type for FlatList's getItemLayout. export type GetItemLayoutFunction = (