Skip to content

Commit bcfd31e

Browse files
Merge #1446
1446: Ensure the document type provided to the search method is a Record r=bidoubiwa a=bidoubiwa fixes: #1425 Co-authored-by: Charlotte Vermandel <[email protected]>
2 parents 81141da + 844cd00 commit bcfd31e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/indexes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class Index<T extends Record<string, any> = Record<string, any>> {
7575
* @param config - Additional request configuration options
7676
* @returns Promise containing the search response
7777
*/
78-
async search<D = T>(
78+
async search<D extends Record<string, any> = T>(
7979
query?: string | null,
8080
options?: SearchParams,
8181
config?: Partial<Request>
@@ -98,7 +98,7 @@ class Index<T extends Record<string, any> = Record<string, any>> {
9898
* @param config - Additional request configuration options
9999
* @returns Promise containing the search response
100100
*/
101-
async searchGet<D = T>(
101+
async searchGet<D extends Record<string, any> = T>(
102102
query?: string | null,
103103
options?: SearchParams,
104104
config?: Partial<Request>

0 commit comments

Comments
 (0)