Skip to content

Instantly share code, notes, and snippets.

@oimou
Created June 14, 2015 15:50
Show Gist options
  • Save oimou/e08f91575def3ff6bad6 to your computer and use it in GitHub Desktop.
Save oimou/e08f91575def3ff6bad6 to your computer and use it in GitHub Desktop.
"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