-
Notifications
You must be signed in to change notification settings - Fork 26.4k
refactor(signal-forms): more ergonomic metadata key creation #62653
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
refactor(signal-forms): more ergonomic metadata key creation #62653
Conversation
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.
- Why are we renaming the exported type from
MetadataKey
toReactiveMetadataKey
? - Could you please elaborate on how this change makes things more ergonomic in the commit description. It's not immediately clear to me how and there's no test/examples demonstrating the change.
I plan to get rid of
Its more ergonomic because you don't have to pass two functions every time you create a metadata key. If you're using one of the built in patterns of reducing the values (e.g. aggregate, min, max) you can just say |
/gemini review |
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.
Code Review
This pull request refactors the creation of metadata keys to be more ergonomic by introducing a factory pattern on the MetadataKey
class. My review includes a few suggestions for minor improvements, such as fixing typos in comments, enhancing readability, and a potential performance optimization in the pattern
validator.
74d83f4
into
angular:prototype/signal-forms
No description provided.