Skip to content

Commit 3453cef

Browse files
committed
types: fix search default type
1 parent 1b5fa38 commit 3453cef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/indexes.ts

Lines changed: 3 additions & 3 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<D = Record<string, any>> {
4848
uid: string
4949
primaryKey: string | undefined
5050
createdAt: Date | undefined
@@ -78,7 +78,7 @@ class Index<T = Record<string, any>> {
7878
* @param {Partial<Request>} config? Additional request configuration options
7979
* @returns {Promise<SearchResponse<T>>} Promise containing the search response
8080
*/
81-
async search<T = Record<string, any>>(
81+
async search<T = D>(
8282
query?: string | null,
8383
options?: SearchParams,
8484
config?: Partial<Request>
@@ -103,7 +103,7 @@ class Index<T = Record<string, any>> {
103103
* @param {Partial<Request>} config? Additional request configuration options
104104
* @returns {Promise<SearchResponse<T>>} Promise containing the search response
105105
*/
106-
async searchGet<T = Record<string, any>>(
106+
async searchGet<T = D>(
107107
query?: string | null,
108108
options?: SearchParams,
109109
config?: Partial<Request>

0 commit comments

Comments
 (0)