Summary
The instantsearch client (@meilisearch/instant-meilisearch) typing is incompatible with the latest release of instantsearch.
Context
Description
The types expected by the latest versions of react-instantsearch and the client returned by @meilisearch/instant-meilisearch and meilisearch do not match.
Versions used:
const { searchClient } = instantMeiliSearch('url', 'apiKey')
return (
<InstantSearch indexName="index" searchClient={searchClient}>
)
Current behavior
Since the new update of the library, a type error occurs when passing the search client returned by instant-meilisearch to the InstantSearch component.
Error:
Type 'InstantMeiliSearchInstance' is not assignable to type 'SearchClient | CompositionClient'.
(The searchClient prop expects a SearchClient | CompositionClient type)
Expected behavior
No error should occur.
Environment (please complete the following information):
- "meilisearch": "^0.48.2",
- "@meilisearch/instant-meilisearch": "^0.24.0",
- "react-instantsearch": "^7.15.3",
Summary
The instantsearch client (
@meilisearch/instant-meilisearch) typing is incompatible with the latest release ofinstantsearch.Context
Description
The types expected by the latest versions of
react-instantsearchand the client returned by@meilisearch/instant-meilisearchandmeilisearchdo not match.Versions used:
Current behavior
Since the new update of the library, a type error occurs when passing the search client returned by
instant-meilisearchto the InstantSearch component.(The
searchClientprop expects aSearchClient | CompositionClienttype)Expected behavior
No error should occur.
Environment (please complete the following information):