Skip to content

Commit

Permalink
fix(answers): omit original hits in response (#1293)
Browse files Browse the repository at this point in the history
Without this, the type is Hit[] & AnswersHit[] (paraphrased), which causes TypeScript to require extra casting to read _answer, which isn't expected.
  • Loading branch information
Haroenv committed Jul 2, 2021
1 parent 4f6ccea commit fb62b15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/client-search/src/types/FindAnswersResponse.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Hit } from './Hit';
import { SearchResponse } from './SearchResponse';

export type FindAnswersResponse<TObject = {}> = SearchResponse<TObject> & {
export type FindAnswersResponse<TObject = {}> = Omit<SearchResponse<TObject>, 'hits'> & {
/**
* The hits returned by the search.
*
Expand Down

0 comments on commit fb62b15

Please sign in to comment.