Skip to content
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(types): use a minimal type for transformSearchClient #2348

Merged
merged 3 commits into from
Nov 12, 2024
Merged

Conversation

millotp
Copy link
Contributor

@millotp millotp commented Nov 12, 2024

The transformSearchClient type has change in the last release (#2326) and is breaking in some situation.
To help with the migration, we can expose a new type that is the bare minimum needed by docsearch.

Copy link

netlify bot commented Nov 12, 2024

Deploy Preview for docsearch ready!

Name Link
🔨 Latest commit 3755b58
🔍 Latest deploy log https://app.netlify.com/sites/docsearch/deploys/67336fbf72ba4e0008c52a2d
😎 Deploy Preview https://deploy-preview-2348--docsearch.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noice

@@ -16,17 +15,23 @@ export type DocSearchTranslations = Partial<{
modal: ModalTranslations;
}>;

export type DocSearchTransformClient = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export type DocSearchTransformClient = {
// The interface that describes the minimal implementation required for the algoliasearch client, when using the [`transformSearchClient`](https://docsearch.algolia.com/docs/api/#transformsearchclient) option
export type DocSearchTransformClient = {

wdyt?

we also need to update the definition here https://docsearch.algolia.com/docs/api/#transformsearchclient

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point

@millotp millotp requested a review from shortcuts November 12, 2024 14:55
Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gg!

@millotp millotp merged commit 08d9a37 into main Nov 12, 2024
10 checks passed
@millotp millotp deleted the fix/common-type branch November 12, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants