Skip to content

Commit

Permalink
feat(react): export InstantSearchApi type (#5518)
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour committed Mar 1, 2023
1 parent 2e3d1f3 commit 27b478f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions packages/react-instantsearch-hooks/src/hooks/useInstantSearch.ts
Expand Up @@ -9,13 +9,14 @@ import type { SearchResultsApi } from '../lib/useSearchResults';
import type { SearchStateApi } from '../lib/useSearchState';
import type { InstantSearch, Middleware, UiState } from 'instantsearch.js';

type InstantSearchApi<TUiState extends UiState> = SearchStateApi<TUiState> &
SearchResultsApi & {
use: (...middlewares: Middleware[]) => () => void;
refresh: InstantSearch['refresh'];
status: InstantSearch['status'];
error: InstantSearch['error'];
};
export type InstantSearchApi<TUiState extends UiState = UiState> =
SearchStateApi<TUiState> &
SearchResultsApi & {
use: (...middlewares: Middleware[]) => () => void;
refresh: InstantSearch['refresh'];
status: InstantSearch['status'];
error: InstantSearch['error'];
};

export type UseInstantSearchProps = {
/**
Expand Down

0 comments on commit 27b478f

Please sign in to comment.