Closed dospunk closed 1 year ago
This would solve #86
Thanks for the pr! I am traveling at the moment, but will take a look when I'm back next week.
I think it would be better to roll this into the existing groupByDecorator
config. You've already expanded support for that matcher in your other PR; I think we could also make it support a boolean, where true
would match any decorator, and false
would match no decorators.
As a tangent, the name "groupByDecorator" is also a bit inconsistent with the rest of the options. As long as we're improving it we could alias it as simply "decorator". So, { decorator: true }
, or { decorator: 'bind' }
.
What do you think?
I think it would be better to roll this into the existing groupByDecorator config. You've already expanded support for that matcher in your other PR; I think we could also make it support a boolean, where true would match any decorator, and false would match no decorators.
As far as I can find, the JSON Schema format doesn't support multiple types so we couldn't have groupByDecorator
take a boolean or a string. We could have it check for the strings "true" and "false" to get the same functionality since they aren't valid names for decorators.
I think oneOf
should do the trick. Something like groupByDecorator: { oneOf: [{ type: 'string' }, { type: 'boolean' }] }
Adds an option to match class members that have no decorator. It can also be used to match members that have any decorator by setting
noDecorator: false