-
Notifications
You must be signed in to change notification settings - Fork 10
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(javascript): remove duplicate types, add some type descriptions #644
Conversation
✅ Deploy Preview for api-clients-automation ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✗ The generated branch has been deleted.If the PR has been merged, you can check the generated code on the |
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.
Very clean ! A few picky comments
readonly headers: () => Readonly<Record<string, string>>; | ||
readonly queryParameters: () => Readonly<Record<string, string>>; | ||
readonly headers: () => Headers; | ||
readonly queryParameters: () => QueryParameters; |
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.
the QueryParameters
type should be stricter IMO, it should be Record<string | number | boolean | Array<string | number | boolean>>
(I think we already have this type somewhere).
In serializeQueryParameters
we also accept Object, I'm sure if we ever use it in the api
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.
IIRC I've went with a stricter type when adding the requestOptions
but since it was any
in v4 I've followed the same implem
clients/algoliasearch-client-javascript/packages/client-common/src/types/Requester.ts
Outdated
Show resolved
Hide resolved
algolia/api-clients-automation#644 Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
🧭 What and Why
🎟 JIRA Ticket: -
Changes included:
🧪 Test
CI :D