Skip to content

Commit af43c5e

Browse files
committed
Make ref type generic
1 parent 9c6865d commit af43c5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ declare module "@uidotdev/usehooks" {
165165

166166
export function useIdle(ms?: number): boolean;
167167

168-
export function useIntersectionObserver(
168+
export function useIntersectionObserver<T extends Element>(
169169
options?: IntersectionObserverInit
170-
): [React.MutableRefObject<Element>, IntersectionObserverEntry | null];
170+
): [React.MutableRefObject<T>, IntersectionObserverEntry | null];
171171

172172
export function useIsClient(): boolean;
173173

0 commit comments

Comments
 (0)