Skip to content

Commit 0705258

Browse files
forabithebuilder
authored andcommitted
Update TypeScript definitions
Allow null for root and array values for threshold in TS definitions
1 parent f55567d commit 0705258

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
@@ -10,7 +10,7 @@ declare module 'react-intersection-observer' {
1010
* the target.
1111
* Defaults to the browser viewport if not specified or if `null`.
1212
*/
13-
root?: HTMLElement;
13+
root?: HTMLElement | null;
1414

1515
/**
1616
* Unique identifier for the root element - This is used to identify the
@@ -38,7 +38,7 @@ declare module 'react-intersection-observer' {
3838
* multiple trigger points.
3939
* @default `0`
4040
*/
41-
threshold?: number;
41+
threshold?: number | number[];
4242

4343
/**
4444
* Only trigger this method once

0 commit comments

Comments
 (0)