I was wondering why in the Angular (2+) Framework source, they use static class for features like Validators ? See an example here : https://github.com/angular/angular/blob/9.1.0/packages/forms/src/validators.ts
I assume the goal of this was to have a Validators
namespace where all the validation methods are grouped in ? But then this will prevent the code to be Tree shakeable if I'm not wrong ? (BTW could this change with Ivy ?)
So why did they decide to use this pattern ? When creating my custom Validator function, should I also stick with this static class pattern for any reason or I could just use export methods (that are tree shakeable) as long as I don't need any class feature ?