Skip to content

Commit 7e0dcc1

Browse files
dardanbujupajStrift
authored andcommitted
Fix search client type
1 parent f6872f1 commit 7e0dcc1

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.changeset/weak-chefs-share.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@meilisearch/instant-meilisearch": patch
3+
---
4+
5+
Fix search client type

packages/instant-meilisearch/src/types/types.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import type SearchClient from 'instantsearch.js'
21
import type {
32
MultipleQueriesQuery as AlgoliaMultipleQueriesQuery,
43
multipleSearchForFacetValues,
54
} from '@algolia/client-search'
5+
import type { InstantSearchOptions } from 'instantsearch.js/es/lib/InstantSearch.js'
66
import type {
77
MultiSearchQuery as MeiliSearchMultiSearchParams,
88
MultiSearchResult,
@@ -127,9 +127,10 @@ export type InstantSearchGeoParams = {
127127
insidePolygon?: ReadonlyArray<readonly number[]>
128128
}
129129

130-
export type InstantMeiliSearchInstance = ReturnType<typeof SearchClient> & {
131-
clearCache: () => void
132-
}
130+
export type InstantMeiliSearchInstance =
131+
InstantSearchOptions['searchClient'] & {
132+
clearCache: () => void
133+
}
133134

134135
export type InstantMeiliSearchObject = {
135136
meiliSearchInstance: MeiliSearch

0 commit comments

Comments
 (0)