import React from 'react'; import PropTypes from 'prop-types'; export interface ReactIntersectionObserverProps { onIntersect?: IntersectionObserverCallback; option?: IntersectionObserverInit; children?: React.ReactNode; root?: IntersectionObserverInit['root']; threshold?: IntersectionObserverInit['threshold']; rootMargin?: IntersectionObserverInit['rootMargin']; items?: Record; } export default class ReactIntersectionObserver extends React.PureComponent { static propTypes: { onIntersect: PropTypes.Requireable<(...args: any[]) => any>; option: PropTypes.Requireable; root: PropTypes.Requireable; threshold: PropTypes.Requireable; rootMargin: PropTypes.Requireable; items: PropTypes.Requireable; }; static defaultProps: { onIntersect: () => void; threshold: number; rootMargin: string; option: {}; items: {}; }; observer: IntersectionObserver; cachedKeys: Array; componentDidMount(): void; componentDidUpdate(): void; componentWillUnmount(): void; observeElement(force?: boolean): void; render(): React.ReactNode; }