Closed NeoJRotary closed 3 months ago
thanks @NeoJRotary for using the beta client and reporting the issue! we have an ongoing fix in https://github.com/algolia/api-clients-automation/pull/3497 which should make the typing better (still not as precise as v4, but that's a bit complicated with code generation on every clients)
I'll let you know once released!
version: 5.0.0-beta.16
Current
HighlightResult
only has single layer or extra one layer ofRecord<>
.https://github.com/algolia/algoliasearch-client-javascript/blob/5c1a7003e4052033048d6f1687cc6eb384b75264/packages/client-search/model/highlightResult.ts#L5-L8
v4 type accepts
THit
and recursive call itself for nested structure.https://github.com/algolia/algoliasearch-client-javascript/blob/99ebe3c8dcea748077a26fb0eb680ffea06af5ab/packages/client-search/src/types/Hit.ts#L8-L12