Skip to content

Commit fb62b15

Browse files
authored
fix(answers): omit original hits in response (#1293)
Without this, the type is Hit[] & AnswersHit[] (paraphrased), which causes TypeScript to require extra casting to read _answer, which isn't expected.
1 parent 4f6ccea commit fb62b15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/client-search/src/types/FindAnswersResponse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Hit } from './Hit';
22
import { SearchResponse } from './SearchResponse';
33

4-
export type FindAnswersResponse<TObject = {}> = SearchResponse<TObject> & {
4+
export type FindAnswersResponse<TObject = {}> = Omit<SearchResponse<TObject>, 'hits'> & {
55
/**
66
* The hits returned by the search.
77
*

0 commit comments

Comments
 (0)