Open tjprescott opened 2 years ago
@petDecorator({name: "Fluffy", age: 10 })
works today, I'm not sure named parameters add much on top if this?
This syntax works for me. @timotheeguerin do you agree?
I think my main problem with what we have now is that there is no help and validation of the params is hard. Passing an object is fine, though slightly uglier. We just need to make sure we'll be able to have CADL do type validation on that.(which i think really is dependent on the subtype/supertype issue like a lot of other things)
Currently, it seems that decorators only accept arguments positionally. I'm wondering if it would be feasible/beneficial to support keyword arguments.