angular/packages/core
Andrew Kushnir 804b6b6685 perf(forms): avoid direct references to the Validators class (#41189) (#41220)
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

PR Close #41220
2021-03-15 12:15:16 -07:00
..
global build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
schematics refactor(compiler): remove unreachable code (#40984) 2021-03-01 15:29:20 -08:00
src fix(core): remove duplicated EMPTY_OBJ constant (#41153) 2021-03-10 10:48:13 -08:00
test perf(forms): avoid direct references to the Validators class (#41189) (#41220) 2021-03-15 12:15:16 -07:00
testing fix(core): fix fakeAsync() error messages (#40442) 2021-01-19 09:15:12 -08:00
BUILD.bazel fix(core): disable tsickle pass when producing APF packages (#37221) 2020-05-21 09:14:47 -07:00
index.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
package.json build: update peerDependencies of zone.js to 0.10~0.11 (#39809) 2020-11-25 14:25:48 -08:00
PACKAGE.md docs: add package doc files (#26047) 2018-10-05 15:42:14 -07:00
public_api.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00