Skip to content

Commit 083fb58

Browse files
committed
FIx useMap type parameters to set value type as well
1 parent 3ff6b7b commit 083fb58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ declare module "@uidotdev/usehooks" {
188188
options?: LongPressOptions
189189
): LongPressFns;
190190

191-
export function useMap<T>(initialState?: T): Map<T, any>;
191+
export function useMap<K,V>(...initialState?: ConstructorParameters<Map<K,V>>): Map<K, V>;
192192

193193
export function useMeasure<T extends Element>(): [
194194
React.RefCallback<T>,

0 commit comments

Comments
 (0)