Skip to content

Commit

Permalink
fix(findAnswers): fix typing (#1233)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eunjae Lee authored Nov 25, 2020
1 parent 42935ba commit a935d88
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/algoliasearch/src/builds/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,11 @@ export type SearchIndex = BaseSearchIndex & {
query: string,
requestOptions?: RequestOptions & SearchOptions
) => Readonly<Promise<SearchResponse<TObject>>>;
readonly findAnswers: (
readonly findAnswers: <TObject>(
query: string,
queryLanguages: readonly string[],
requestOptions?: RequestOptions & FindAnswersOptions
) => Readonly<Promise<FindAnswersResponse>>;
) => Readonly<Promise<FindAnswersResponse<TObject>>>;
readonly searchForFacetValues: (
facetName: string,
facetQuery: string,
Expand Down
4 changes: 2 additions & 2 deletions packages/algoliasearch/src/builds/browserLite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ export type SearchIndex = BaseSearchIndex & {
facetQuery: string,
requestOptions?: RequestOptions & SearchOptions
) => Readonly<Promise<SearchForFacetValuesResponse>>;
readonly findAnswers: (
readonly findAnswers: <TObject>(
query: string,
queryLanguages: readonly string[],
requestOptions?: RequestOptions & FindAnswersOptions
) => Readonly<Promise<FindAnswersResponse>>;
) => Readonly<Promise<FindAnswersResponse<TObject>>>;
};

export type SearchClient = BaseSearchClient & {
Expand Down
4 changes: 2 additions & 2 deletions packages/algoliasearch/src/builds/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,11 +357,11 @@ export type SearchIndex = BaseSearchIndex & {
facetQuery: string,
requestOptions?: RequestOptions & SearchOptions
) => Readonly<Promise<SearchForFacetValuesResponse>>;
readonly findAnswers: (
readonly findAnswers: <TObject>(
query: string,
queryLanguages: readonly string[],
requestOptions?: RequestOptions & FindAnswersOptions
) => Readonly<Promise<FindAnswersResponse>>;
) => Readonly<Promise<FindAnswersResponse<TObject>>>;
readonly batch: (
requests: readonly BatchRequest[],
requestOptions?: RequestOptions
Expand Down

0 comments on commit a935d88

Please sign in to comment.