3bd1992218
Currently the `Validators` class contains a number of static methods that represent different validators as well as some helper methods. Since class methods are not tree-shakable, any reference to the `Validator` class retains all of its methods (even if you've used just one). This commit refactors the code to extract the logic into standalone functions and use these functions in the code instead of referencing them via `Validators` class. That should make the code more tree-shakable. The `Validators` class still retains its structure and calls these standalone methods internally to keep this change backwards-compatible. PR Close #41189 |
||
---|---|---|
.. | ||
src | ||
test | ||
BUILD.bazel | ||
PACKAGE.md | ||
index.ts | ||
package.json | ||
public_api.ts |