-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type conflict between algoliasearch client and its usage in instantSearch #4916
Comments
yes, it's really the client type that is a little more restrictive than needed. Does having a ts-ignore have an impact on any site though? The correct type is |
It creates a bit of magic code/technical debt as you'll have to remember that somewhere in your code lies a It is the reason I think why you use TypeScript, to avoid manipulating variables in another type.
Thats cool 😊 Is the fix planned for a near release? |
I'd need to check whether the typescript version required in algoliasearch is modern enough to allow template strings, but otherwise, feel free to make a pull request and then it will be fixed @bidoubiwa :) |
I will do that! Thanks a lot for your answers :) I thought you might not want to change the types of algoliasearch-client as they are independent of instantsearch 😅. But If it's oke and if it does not break the whole package, I will absolutely do the PR! |
Should be fixed by: algolia/algoliasearch-client-javascript#1310 |
* refactor(version): bump algoliasearch version to v0.11.0 * Import algoliasearch tarball package with type fix * refactor(packages): Remove algoliasearch tarball * refactor(types): Remove type work-arround for boundingBox (#2) * Import algoliasearch client with type fix * Remove unecessary type enforcement * refactor(package): Bump algoliasearch to v0.11.0 fixes: #4916
* chore(version): bump algoliasearch version to v0.11.0 (#4938) * refactor(version): bump algoliasearch version to v0.11.0 * Import algoliasearch tarball package with type fix * refactor(packages): Remove algoliasearch tarball * refactor(types): Remove type work-arround for boundingBox (#2) * Import algoliasearch client with type fix * Remove unecessary type enforcement * refactor(package): Bump algoliasearch to v0.11.0 fixes: #4916 * chore(version): Fix failing tests when using algoliasearch@v3 (#4941) * docs(contributing): Add doc on instantsearch cross version testing * fix(tests): Fixes insideboundingbox tests * core(geo): Reverse removal of geo forced typecasting * Update testing script in contributing * Typescript installation documentation * chore(version): reverse type enforcing functions (#4942) * update wordings, remove script * Apply suggestions from code review Co-authored-by: Sarah Dayan <5370675+sarahdayan@users.noreply.github.com> Co-authored-by: cvermand <33010418+bidoubiwa@users.noreply.github.com> Co-authored-by: Sarah Dayan <5370675+sarahdayan@users.noreply.github.com>
🐛 Bug description
related to: #4911
The InstantSearch client returns upon search with the geo widget the
insideBoundingBox
field containing a string.See the following test:
https://github.com/algolia/instantsearch.js/blob/6e6293046de82f90336bc857efa9d0f5fcb8e62b/src/widgets/geo-search/__tests__/geo-search-test.ts#L1717-L1721
Nonetheless the declared type dictates that it should return an array of array of numbers:
see SearchOptions types.
🔍 Bug reproduction
Steps to reproduce the behavior:
insideBoundingBox
💭 Expected behavior
They should be of same type
Environment
The text was updated successfully, but these errors were encountered: