Sumirer

Sumirer

all things are difficult before they are easy

TypeScript中方法装饰器的this指向问题
起因在ts中,装饰器是一种对class中属性处理的方式,例如 1234567891011121314151617function format() { return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) { const targetValue = descriptor.value; descriptor.value = (...args: any[]) => { console.log...
avatar
Sumirer
all things are difficult before they are easy