meilisearch / meilisearch-js

JavaScript client for the Meilisearch API

Home Page:https://www.meilisearch.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve generic extension in search and getSearch

bidoubiwa opened this issue · comments

In the following methods:

async searchGet<D = T>(

and

async search<D = T>(

The generic D should always extend Record<string, any>.

Thus, they should be added in the generic definition like this

 async searchGet<D extends Record<string, any> = T>