File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -72,10 +72,10 @@ class Index extends MeiliAxiosWrapper implements Types.IndexInterface {
7272 * @memberof Index
7373 * @method search
7474 */
75- async search (
75+ async search < T > (
7676 query : string ,
7777 options ?: Types . SearchParams
78- ) : Promise < Types . SearchResponse > {
78+ ) : Promise < Types . SearchResponse < T > > {
7979 const url = `/indexes/${ this . uid } /search`
8080
8181 const params : Types . SearchRequest = {
Original file line number Diff line number Diff line change @@ -233,7 +233,10 @@ export interface IndexInterface extends MeiliAxiosWrapperInterface {
233233 uid : string
234234 getUpdateStatus : ( updateId : number ) => Promise < Update >
235235 getAllUpdateStatus : ( ) => Promise < Update [ ] >
236- search : ( query : string , options ?: SearchParams ) => Promise < SearchResponse >
236+ search : < T > (
237+ query : string ,
238+ options ?: SearchParams
239+ ) => Promise < SearchResponse < T > >
237240 show : ( ) => Promise < IndexResponse >
238241 updateIndex : ( data : UpdateIndexRequest ) => Promise < IndexResponse >
239242 deleteIndex : ( ) => Promise < string >
@@ -296,11 +299,11 @@ export interface MeiliAxiosWrapperInterface {
296299 data : IndexRequest ,
297300 config ?: AxiosRequestConfig
298301 ) => Promise < IndexResponse > ) &
299- ( < T = any , R = AxiosResponse < EnqueuedUpdate > > (
300- url : string ,
301- data ?: T ,
302- config ?: AxiosRequestConfig
303- ) => Promise < R > )
302+ ( < T = any , R = AxiosResponse < EnqueuedUpdate > > (
303+ url : string ,
304+ data ?: T ,
305+ config ?: AxiosRequestConfig
306+ ) => Promise < R > )
304307 put : < T = any , R = AxiosResponse < T > > (
305308 url : string ,
306309 data ?: any ,
You can’t perform that action at this time.
0 commit comments