Created
June 14, 2015 15:50
-
-
Save oimou/e08f91575def3ff6bad6 to your computer and use it in GitHub Desktop.
This file contains 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
"use strict"; | |
function loggableClass(target) { | |
console.log("Class: %s", target.name); | |
return target; | |
} | |
function loggableMethod(target, name, descriptor) { | |
console.log("Method: %s", name); | |
return descriptor; | |
} | |
@loggableClass | |
class Klass { | |
@loggableMethod | |
hello() { | |
console.log("world"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment