import InstantSearch from 'instantsearch.js/es/lib/InstantSearch'; import type { InstantSearchOptions, UiState } from 'instantsearch.js'; export type UseInstantSearchApiProps = InstantSearchOptions; export type InternalInstantSearch = InstantSearch & { /** * Schedule a function to be called on the next timer tick * @private */ _schedule: { (cb: () => void): void; queue: Array<() => void>; timer: ReturnType | undefined; }; /** * Used inside useWidget, which ensures that removeWidgets is not called. * This prevents a search from being triggered when InstantSearch is also unmounted. * @private */ _preventWidgetCleanup?: boolean; }; export declare function useInstantSearchApi(props: UseInstantSearchApiProps): InstantSearch;