is learning Decorator, and found that when defining Decorator, some functions return propertyDescriptor, and some do not. So what exactly needs to be returned, or whether it is returned or not has little impact?
returned the Decorator of PropertyDescriptor:
function readonly(target, name, descriptor){
descriptor.writable = false;
return descriptor;
}
No Decorator of PropertyDescriptor is returned:
function testable(target) {
target.isTestable = true;
}