algolia / algolia/algoliasearch-client-javascript

Type error in searchOptions["facets"] which should also accept `string`

オープン
#1,432 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
1.4k
フォーク
226
PR マージ指標
30日以内にマージされた PR はありません

説明

The current type of `facets` in the searchOptions is:

https://github.com/algolia/algoliasearch-client-javascript/blob/ba59b68aa9494c29e284ed45e924267d7388baa9/packages/client-search/src/types/SearchOptions.ts#L104

Nonetheless, while this is true when no facets are checked, once it is `facets` may contain a string.

Screenshot 2022-12-13 at 17 58 29

Screenshot 2022-12-13 at 17 58 40

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Open packages/client-search/src/types/SearchOptions.ts at the linked line and inspect the current type definition for searchOptions["facets"]. Confirm how the type represents facets when values are selected, then update the declaration so string values are accepted while preserving the existing forms; the work is done when the reported TypeScript error no longer occurs.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
api
issue の種類
バグ
難易度
1/5
見積もり時間
1時間未満
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。