Trying to figure out ESM #247
-
I've found the file path to a type I need for a type called InstantSearchServerState is "node_modules/react-instantsearch-hooks/dist/es/components/InstantSearchSSRProvider.d.ts" import type { InitialResults, UiState } from 'instantsearch.js';
import type { ReactNode } from 'react';
export type InstantSearchServerState = {
initialResults: InitialResults;
};
export type InstantSearchSSRProviderProps = Partial<InstantSearchServerState> & {
children?: ReactNode;
};
/**
* Provider to pass the server state retrieved from `getServerState()` to
* <InstantSearch>.
*/
export declare function InstantSearchSSRProvider<TUiState extends UiState, TRouteState = TUiState>({ children, ...props }: InstantSearchSSRProviderProps): JSX.Element; Write this in a route: The things exported are when going to export { default as version } from './version';
export * from './components/Configure';
export * from './components/DynamicWidgets';
export * from './components/Index';
export * from './components/InstantSearch';
export * from './components/InstantSearchServerContext';
export * from './components/InstantSearchSSRProvider';
export * from './connectors/useBreadcrumb';
export * from './connectors/useClearRefinements';
export * from './connectors/useConfigure';
export * from './connectors/useCurrentRefinements';
export * from './connectors/useDynamicWidgets';
export * from './connectors/useHierarchicalMenu';
export * from './connectors/useHits';
export * from './connectors/useHitsPerPage';
export * from './connectors/useInfiniteHits';
export * from './connectors/useMenu';
export * from './connectors/useNumericMenu';
export * from './connectors/usePagination';
export * from './connectors/usePoweredBy';
export * from './connectors/useQueryRules';
export * from './connectors/useRange';
export * from './connectors/useRefinementList';
export * from './connectors/useSearchBox';
export * from './connectors/useSortBy';
export * from './connectors/useStats';
export * from './connectors/useToggleRefinement';
export * from './hooks/useConnector';
export * from './hooks/useInstantSearch'; I'm just not sure what I have to do to make this work with the least amount of effort...for now this works
But, I would want to avoid that. Plus, I have to use the components below: import {
Configure,
Hits,
InstantSearch,
InstantSearchSSRProvider,
Pagination,
SearchBox,
} from 'react-instantsearch-hooks-web' And none of them are in the index.d.ts that |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
To continue...I'm pretty sure I have to do some lifting of declaring my own |
Beta Was this translation helpful? Give feedback.
Here's where you stick dependency definitions you can't install: https://github.com/epicweb-dev/epic-stack/blob/main/types/deps.d.ts