Skip to content

Commit 3adff6c

Browse files
Merge pull request #228 from jack0pan/export-use-local-storage
Add type declaration for `useLocalStorage`
2 parents aaac310 + c1a0fa8 commit 3adff6c

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
@@ -176,6 +176,11 @@ declare module "@uidotdev/usehooks" {
176176

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

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

181186
export function useLongPress(

0 commit comments

Comments
 (0)