-
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
fix(ts): make template types consistent #4785
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 855a38d:
|
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.
overall almost good to merge, although the Partial<{...}> should probably be stacked + deciding what to do with spreading defaultTemplates or equaling to defaultTemplates
src/components/RefinementList/__tests__/RefinementList-test.tsx
Outdated
Show resolved
Hide resolved
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.
all right, this is a great effort! let's still do a global search for userTemplates
and avoid it wherever the templates get prepared after :)
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.
perfect!
Summary
Follow up of #4774
In some cases, we were exporting our Templates types as required for our widgets, while they are in reality optional and partial.
To avoid our users to provide extra logic over our types and to keep it consistent with our usage, the types are now:
Result
The exported types are now correct.
Ticket
DX-1778