core-decorators
core-decorators copied to clipboard
Decorators for validations
Is there any plan to add decorators for performing various validations - type checks, null checks, custom checks on properties? Does it make sense to have them as part of this collection?
I would be happy to contribute if this seems fit and has potential interests.
No plans, but we can definitely discuss them! I think let's start with describing some concrete examples (with pseudo code) then we can go from there to see if they'd be a good fit.
As a guiding principle: the overall goal of core-decorators right now is mostly to implement decorators for fundamental things. The sort of decorators you might expect to be available by default in JavaScript, but aren't. It's not a strict definition though, if a given decorator is provides enough convenience and utility to be included. 😄
@jayphelps I found a case where I wanted to validate the Type of an argument passed into a method. Would this be something you'd be into having a look at. I'd be stoked to try to contribute