diff --git a/types/react-infinite-scroll-component/index.d.ts b/types/react-infinite-scroll-component/index.d.ts index 768ad1831b..f43fc50e24 100644 --- a/types/react-infinite-scroll-component/index.d.ts +++ b/types/react-infinite-scroll-component/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/ankeetmaini/react-infinite-scroll-component#readme // Definitions by: Stephanie Roy // Bartosz Dotryw +// David Kevork // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -34,7 +35,7 @@ declare namespace InfiniteScroll { /** * You can send a loader component to show while the component waits for the next load of data. e.g.

Loading...

or any fancy loader element */ - loader?: React.ReactNode; + loader: React.ReactNode; /** * This function will be called, it should return the fresh data that you want to show the user @@ -59,7 +60,7 @@ declare namespace InfiniteScroll { /** * Any JSX that you want to show the user, default={

Release to refresh

} */ - releaseToRefreshContent?: boolean; + releaseToRefreshContent?: React.ReactNode; /** * A threshold value defining when InfiniteScroll will call next. Default value is 0.8. It means the next will be called when user comes below 80% of the total height. @@ -84,6 +85,11 @@ declare namespace InfiniteScroll { */ hasChildren?: boolean; + /** + * Children component which will be rendered + */ + children?: React.ReactNode; + /** * Set a scroll y position for the component to render with. */ diff --git a/types/react-infinite-scroll-component/react-infinite-scroll-component-tests.tsx b/types/react-infinite-scroll-component/react-infinite-scroll-component-tests.tsx index 2b5a01d4cc..6eb67569a0 100644 --- a/types/react-infinite-scroll-component/react-infinite-scroll-component-tests.tsx +++ b/types/react-infinite-scroll-component/react-infinite-scroll-component-tests.tsx @@ -10,6 +10,7 @@ const props: InfiniteScroll.InfiniteScrollProps = { dataLength: 4, hasMore: true, endMessage: 'The end.', + loader:

Loading...

, next: () => null, };