-
Notifications
You must be signed in to change notification settings - Fork 65
Fix search client type #1396
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
Fix search client type #1396
Conversation
🦋 Changeset detectedLatest commit: 76d659f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughA patch changeset was added to document a type correction for the search client in Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant instantMeiliSearch
participant InstantSearch (React/Vue/etc.)
Developer->>instantMeiliSearch: Call instantMeiliSearch(url, apiKey)
instantMeiliSearch-->>Developer: Return { searchClient }
Developer->>InstantSearch: Pass searchClient as prop
InstantSearch->>searchClient: Use for queries (type now matches expectations)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~6 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🔇 Additional comments (3)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @dardanbujupaj, and thanks for your contribution 🙌
@Strift Thanks for the quick merge! Glad I could help. |
Pull Request
Related issue
Fixes #1377
What does this PR do?
Use
InstantSearchOptions['searchClient']
to define the search client type, similar to how instantsearch.js does it. This fixes the issue where search client won't match the type required by react instantsearch.I'm not too happy with the import from
instantsearch.js/es/lib/InstantSearch.js
. InstantSearch (andInstantSearchOptions
) should actually be exported by the root types ofinstantsearch.js
, but I assume there's either something wrong with their package definition or the vite/ts config in this repo, but I'm honestly not too proficient with bundling configs.I also saw (after implementing this) that this is also done similarly in #1378. But I hope we can merge this one more quickly, as it's just a tiny change.
PR checklist
Please check if your PR fulfills the following requirements:
Summary by CodeRabbit
Bug Fixes
Chores