Skip to content

Commit 8b8cefa

Browse files
committed
fix type
1 parent c69d9ac commit 8b8cefa

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
@@ -44,7 +44,7 @@ import { HttpRequests } from './http-requests'
4444
import { Task, TaskClient } from './task'
4545
import { EnqueuedTask } from './enqueued-task'
4646

47-
class Index<T = Record<string, any>> {
47+
class Index<T extends Record<string, any> = Record<string, any>> {
4848
uid: string
4949
primaryKey: string | undefined
5050
createdAt: Date | undefined
@@ -130,7 +130,7 @@ class Index<T = Record<string, any>> {
130130
attributesToHighlight: options?.attributesToHighlight?.join(','),
131131
}
132132

133-
return await this.httpRequest.get<SearchResponse<T>>(
133+
return await this.httpRequest.get<SearchResponse<D>>(
134134
url,
135135
removeUndefinedFromObject(getParams),
136136
config

0 commit comments

Comments
 (0)