diff --git a/types/react-instantsearch-core/index.d.ts b/types/react-instantsearch-core/index.d.ts index 64375d6e20..75bac4f7f9 100644 --- a/types/react-instantsearch-core/index.d.ts +++ b/types/react-instantsearch-core/index.d.ts @@ -341,10 +341,11 @@ export function connectHitsPerPage(Composed: React.ComponentType): React.Co export interface InfiniteHitsProvided { /** the records that matched the search */ hits: THit[]; - /** a function to toggle the refinement */ - refine: (...args: any[]) => any; /** indicates if there are more pages to load */ hasMore: boolean; + hasPrevious: boolean; + refineNext: (...args: any[]) => any; + refinePrevious: (...args: any[]) => any; } /** diff --git a/types/react-instantsearch-dom/index.d.ts b/types/react-instantsearch-dom/index.d.ts index c1cf8ba331..d2d3995bd6 100644 --- a/types/react-instantsearch-dom/index.d.ts +++ b/types/react-instantsearch-dom/index.d.ts @@ -55,21 +55,21 @@ interface CommonWidgetProps { } export interface InstantSearchProps { - apiKey: string; - appId: string; + apiKey?: string; + appId?: string; indexName: string; - - algoliaClient?: any; searchClient?: any; + createURL?: (...args: any[]) => any; searchState?: any; refresh?: boolean; onSearchStateChange?: (...args: any[]) => any; onSearchParameters?: (...args: any[]) => any; resultsState?: any; + stalledSearchDelay?: number; root?: { Root: string | ((...args: any[]) => any); - props: any; + props?: object; }; } /** diff --git a/types/react-instantsearch-dom/react-instantsearch-dom-tests.tsx b/types/react-instantsearch-dom/react-instantsearch-dom-tests.tsx index e10d3fde08..c2cd02c0d7 100644 --- a/types/react-instantsearch-dom/react-instantsearch-dom-tests.tsx +++ b/types/react-instantsearch-dom/react-instantsearch-dom-tests.tsx @@ -80,9 +80,8 @@ import { Hit, connectRefinementList, connectMenu } from 'react-instantsearch-cor function App() { return ( @@ -116,9 +115,8 @@ import { Hit, connectRefinementList, connectMenu } from 'react-instantsearch-cor // function App() { // return ( // // // @@ -130,9 +128,8 @@ import { Hit, connectRefinementList, connectMenu } from 'react-instantsearch-cor () => { const App = () => ( { // const App = () => ( // // // { const App = () => ( @@ -182,9 +177,8 @@ import { Hit, connectRefinementList, connectMenu } from 'react-instantsearch-cor // const App = () => ( // //
// { // https://community.algolia.com/react-instantsearch/guide/Search_parameters.html // widgets @@ -246,9 +239,8 @@ import { renderToString } from 'react-dom/server'; render() { return ( diff --git a/types/react-instantsearch/react-instantsearch-tests.tsx b/types/react-instantsearch/react-instantsearch-tests.tsx index 33f362b272..ccb00b967f 100644 --- a/types/react-instantsearch/react-instantsearch-tests.tsx +++ b/types/react-instantsearch/react-instantsearch-tests.tsx @@ -262,7 +262,7 @@ import { createInstantSearch } from "react-instantsearch-core"; () => { const App = () => ( - +
@@ -374,9 +374,8 @@ import { createInstantSearch } from "react-instantsearch-core"; const App = () => (