Skip to content

Instantly share code, notes, and snippets.

@Yang03 Yang03/decorator.js
Created Oct 10, 2017

Embed
What would you like to do?
function fnWrapDecorator(fn) {
return (...args) => {
return (target, propertyKey, descriptor) => {
const fn = descriptor.value
let wrappedFn = fn.applay(null, [fn, ...args])
return {
configurable: true,
get() {
return fn
}
}
}
}
}
@Yang03

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.