Skip to content

Commit 118b36f

Browse files
emyannbidoubiwa
authored andcommitted
fix: fallback on any type if no type provided
1 parent 0f2aa58 commit 118b36f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class Index extends MeiliAxiosWrapper implements Types.IndexInterface {
7272
* @memberof Index
7373
* @method search
7474
*/
75-
async search<T>(
75+
async search<T = any>(
7676
query: string,
7777
options?: Types.SearchParams
7878
): Promise<Types.SearchResponse<T>> {

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ export interface IndexInterface extends MeiliAxiosWrapperInterface {
233233
uid: string
234234
getUpdateStatus: (updateId: number) => Promise<Update>
235235
getAllUpdateStatus: () => Promise<Update[]>
236-
search: <T>(
236+
search: <T = any>(
237237
query: string,
238238
options?: SearchParams
239239
) => Promise<SearchResponse<T>>

0 commit comments

Comments
 (0)