I've got a type-error with the js-client when call...
# community-help
h
I've got a type-error with the js-client when calling multiSearch.perform(). Is it my typing that results in the UnionSearchResponse or is there something else going on? Code
Copy code
const response = typesense.multiSearch.perform<[product_categories: ProductCategory, products: ProductSearch]>(
  {
    searches: [
      {
        collection: 'product_categories',
        q: searchValue.value,
        query_by: 'name,description',
        limit: 5,
      },
      {
        collection: 'products.search',
        q: searchValue.value,
        ...searchParams.value,
        limit: 4,
      },
    ],
  },
)
The type returns as
UnionSearchResponse<ProductCategory | ProductSearch>
instead of
MultiSearchResponse<[product_categories: ProductCategory, products: Product]>
Typesense ^2.0.3
1