From df80103e02a8f8323683a48c6fe301ace20293b0 Mon Sep 17 00:00:00 2001 From: Muhammad Faizan Uddin Date: Sun, 10 Mar 2024 23:55:31 +0400 Subject: [PATCH] Update useMap Typing This PR updates the type signature of the useMap function to improve type safety. By specifying separate generic types for keys and values (K and V), we ensure that the useMap hook is more accurately typed --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index db01dc2..c231efd 100644 --- a/index.d.ts +++ b/index.d.ts @@ -188,7 +188,7 @@ declare module "@uidotdev/usehooks" { options?: LongPressOptions ): LongPressFns; - export function useMap(initialState?: T): Map; + export function useMap(initialState?: Map): Map; export function useMeasure(): [ React.RefCallback,