-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
feat(apply-decorators) #3113
feat(apply-decorators) #3113
Conversation
Pull Request Test Coverage Report for Build 4215
💛 - Coveralls |
*/ | ||
export function applyDecorators( | ||
...decorators: Array<(target: object, ...params: any[]) => any> | ||
): (target: object, ...params: any[]) => any { |
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.
Instead of using any
, can you refactor the code to use MethodDecorator
/ ClassDecorator
type?
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.
Done, I've also created an exported type to define the new decorator.
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.
Thank you!
Do you want to create a PR to the docs with this feature? |
Sure, but my English is so far from perfect, maybe will need a review, I'll refer docs PR here when done. |
Sure thing, no worries @karlos1337! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
A new helper method.
What is the current behavior?
Issue Number: #3104
What is the new behavior?
Could use helper method to combine multiple decorators at once.
For example:
To be used as:
Applying all four decorators at once and encapsulating all auth related ones.
Does this PR introduce a breaking change?