Closed christopherjbaker closed 4 years ago
Is there anything in this preventing the following from working too:
export class Product extends ObserveObject {
}
async(Product.prototype, 'details', function(){
return Promise.resolve();
});
I could see this being another desirable signature.
@justinbmeyer not without a bunch of type checking. In the decorator, the third parameter is the descriptor; this is just looking up what the descriptor is if it's not provided. It's not meant to be an alternative to decorators, it's just an alternative way to trigger them if you don't have decorator syntax support.
So with the new-new decorator standard, you can't just call a decorator like a function anymore, so I think we need to go back to the drawing board on this one
With this minor change file, we can allow one to call the function with the prototype and key, for environments where decorators are unavailable.