Skip to content

Commit 3d4d175

Browse files
fpapadothebuilder
authored andcommitted
Clean up TS types
1 parent 9ce84fd commit 3d4d175

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ declare module 'react-intersection-observer' {
66
children?: React.ReactNode | ((inView: boolean) => React.ReactNode)
77

88
/** Render prop boolean indicating inView state */
9-
render?(inView: boolean): React.ReactNode
9+
render?: (inView: boolean) => React.ReactNode
1010

1111
/**
1212
* The `HTMLElement` that is used as the viewport for checking visibility of
@@ -50,10 +50,10 @@ declare module 'react-intersection-observer' {
5050
triggerOnce?: boolean
5151

5252
/** Call this function whenever the in view state changes */
53-
onChange?(inView: boolean | React.FormEvent<HTMLElement>): void
53+
onChange?: (inView: boolean) => void
5454

5555
/** Get a reference to the the inner DOM node */
56-
innerRef?(element?: HTMLElement): void
56+
innerRef?: (element?: HTMLElement) => void
5757
}
5858

5959
export default class IntersectionObserver extends React.Component<

0 commit comments

Comments
 (0)