Skip to content

Commit c02fee6

Browse files
committed
fix v4 type issue
1 parent bc997e5 commit c02fee6

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

packages/algoliasearch-helper/types/algoliasearch.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,14 @@ export type RecommendResponses<T> = PickForClient<{
182182
v5: AlgoliaSearch.GetRecommendationsResponse;
183183
}>;
184184

185+
export type TrendingFacetHit = PickForClient<{
186+
v3: any;
187+
// @ts-ignore
188+
v4: RecommendClient.TrendingFacetHit;
189+
// @ts-ignore
190+
v5: RecommendClient.TrendingFacetHit;
191+
}>;
192+
185193
// We remove `indexName` from the Recommend query types as the helper
186194
// will fill in this value before sending the queries
187195
type _OptionalKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;

packages/instantsearch-ui-components/src/components/TrendingFacets.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import type {
1919
Renderer,
2020
SendEventForHits,
2121
} from '../types';
22-
import type { TrendingFacetHit as Base } from 'algoliasearch/lite';
22+
import type { TrendingFacetHit as Base } from 'instantsearch.js';
2323

2424
export type TrendingFacetHit = Base & {
2525
__position: number;

packages/instantsearch.js/src/connectors/trending-facets/connectTrendingFacets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import type {
1414
Unmounter,
1515
UnknownWidgetParams,
1616
RecommendResponse,
17+
TrendingFacetHit,
1718
} from '../../types';
18-
import type { TrendingFacetHit } from './types';
1919

2020
const withUsage = createDocumentationMessageGenerator({
2121
name: 'trending-facets',

packages/instantsearch.js/src/connectors/trending-facets/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { TrendingFacetHit as Base } from 'algoliasearch/lite';
1+
import type { TrendingFacetHit as Base } from 'instantsearch.js';
22

33
export type TrendingFacetHit = Base & {
44
__position: number;

0 commit comments

Comments
 (0)