Skip to content

Commit c1a0fa8

Browse files
authored
Add type declaration for useLocalStorage
1 parent b9b6980 commit c1a0fa8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ declare module "@uidotdev/usehooks" {
175175

176176
export function useList<T>(defaultList?: T[]): [T[], CustomList<T>];
177177

178+
export function useLocalStorage<T>(
179+
key: string,
180+
initialValue?: T
181+
): [T, React.Dispatch<React.SetStateAction<T>>];
182+
178183
export function useLockBodyScroll(): void;
179184

180185
export function useLongPress(

0 commit comments

Comments
 (0)