-
Notifications
You must be signed in to change notification settings - Fork 18
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
Custom types #180
Custom types #180
Conversation
|
||
var customHooks = _.flatten(_.map(_.keys(customTypes), function(key) { | ||
// Modify a names of the hooks to include field name they applied to | ||
_.each(customTypes[key].hooks, function(whenHooks, when) { |
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.
Does it expect a structure like this? It kind of doesn't follow semantics of hooks?
{before: {
write: {
fn: function(){}
}
}
}`
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.
Yes, it does. But not sure what you meant by "It kind of doesn't follow semantics of hooks?". Can you pls extend the statement
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.
Usage example, just in case: https://bitbucket.org/flyvictor/user-service/pull-requests/853/sup-661-custom-type-usage-example-do-not/diff
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.
Ok, think i got it. In design doc these hooks were passed through as properties of options, but chaining is probably even better.
No description provided.