1 import memoizee from 'memoizee'
3 export function Memoize (config?: memoizee.Options<any>) {
4 return function (_target, _key, descriptor: PropertyDescriptor) {
5 const oldFunction = descriptor.value
6 const newFunction = memoizee(oldFunction, config)
8 descriptor.value = function () {
9 return newFunction.apply(this, arguments)