algolia / algolia/algoliasearch-client-javascript

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

Abierto
#1,432 3 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
1.4k
Forks
226
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
typescript
Área
api
Tipo de issue
Error
Dificultad
1/5
Tiempo estimado
Menos de una hora
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.