Last active
July 30, 2018 15:29
-
-
Save k1r0s/c4c2fadac32e8f84253df8a1a2318b9a to your computer and use it in GitHub Desktop.
What we can achieve using AOP with ES7 Decorators
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Invoice { | |
... | |
@beforeMethod(Validators.customValidate) | |
@afterMethod(Serialize) | |
@afterMethod(AsyncAdvices.postResult, 'url..') | |
@afterMethod(triggerUpdates) | |
doCheckout(shippingDetails){ | |
this.shippingDetails = shippingDetails | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment