Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(preset-algolia): ensure "ts-ignore" is present in the output #1035

Merged
merged 1 commit into from
Oct 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions packages/autocomplete-preset-algolia/src/types/algoliasearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ type SearchClientShape = {
};

type ClientLiteV5 = AnyToUnknown<
// @ts-ignore
/** @ts-ignore */
ReturnType<typeof AlgoliaSearch.liteClient>
>;
type ClientSearchV5 = AnyToUnknown<
// @ts-ignore
/** @ts-ignore */
ReturnType<typeof ClientSearch.searchClient>
>;
type ClientV5 = ClientLiteV5 extends SearchClientShape
Expand All @@ -29,43 +29,43 @@ type PickForClient<
> = ClientV5 extends SearchClientShape ? TMapping['v5'] : TMapping['v4'];

export type SearchClient = PickForClient<{
// @ts-ignore
/** @ts-ignore */
v4: AlgoliaSearch.SearchClient;
// @ts-ignore
/** @ts-ignore */
v5: ClientV5;
}>;

export type MultipleQueriesQuery = PickForClient<{
// @ts-ignore
/** @ts-ignore */
v4: ClientSearch.MultipleQueriesQuery;
// @ts-ignore
/** @ts-ignore */
v5: AlgoliaSearch.LegacySearchMethodProps[number];
}>;

export type SearchForFacetValuesResponse = PickForClient<{
// @ts-ignore
/** @ts-ignore */
v4: ClientSearch.SearchForFacetValuesResponse;
// @ts-ignore
/** @ts-ignore */
v5: AlgoliaSearch.SearchForFacetValuesResponse;
}>;

export type SearchResponse<THit> = PickForClient<{
// @ts-ignore
/** @ts-ignore */
v4: ClientSearch.SearchResponse<THit>;
// @ts-ignore
/** @ts-ignore */
v5: AlgoliaSearch.SearchResponse<THit>;
}>;

export type HighlightResult<THit> = PickForClient<{
// @ts-ignore
/** @ts-ignore */
v4: ClientSearch.HighlightResult<THit>;
// @ts-ignore
/** @ts-ignore */
v5: AlgoliaSearch.HighlightResult; // should be generic, but isn't yet in the client
}>;

export type SnippetResult<THit> = PickForClient<{
// @ts-ignore
/** @ts-ignore */
v4: ClientSearch.SnippetResult<THit>;
// @ts-ignore
/** @ts-ignore */
v5: AlgoliaSearch.SnippetResult; // should be generic, but isn't yet in the client
}>;