@angular/forms 16.0.0-next.5 → 16.0.0-next.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/esm2022/src/directives/abstract_form_group_directive.mjs +3 -3
  2. package/esm2022/src/directives/checkbox_value_accessor.mjs +3 -3
  3. package/esm2022/src/directives/control_value_accessor.mjs +6 -6
  4. package/esm2022/src/directives/default_value_accessor.mjs +3 -3
  5. package/esm2022/src/directives/ng_control_status.mjs +6 -6
  6. package/esm2022/src/directives/ng_form.mjs +3 -3
  7. package/esm2022/src/directives/ng_model.mjs +3 -3
  8. package/esm2022/src/directives/ng_model_group.mjs +3 -3
  9. package/esm2022/src/directives/ng_no_validate_directive.mjs +3 -3
  10. package/esm2022/src/directives/number_value_accessor.mjs +3 -3
  11. package/esm2022/src/directives/radio_control_value_accessor.mjs +10 -10
  12. package/esm2022/src/directives/range_value_accessor.mjs +3 -3
  13. package/esm2022/src/directives/reactive_directives/form_control_directive.mjs +3 -3
  14. package/esm2022/src/directives/reactive_directives/form_control_name.mjs +3 -3
  15. package/esm2022/src/directives/reactive_directives/form_group_directive.mjs +3 -3
  16. package/esm2022/src/directives/reactive_directives/form_group_name.mjs +6 -6
  17. package/esm2022/src/directives/select_control_value_accessor.mjs +6 -6
  18. package/esm2022/src/directives/select_multiple_control_value_accessor.mjs +6 -6
  19. package/esm2022/src/directives/validators.mjs +28 -28
  20. package/esm2022/src/directives.mjs +4 -4
  21. package/esm2022/src/form_builder.mjs +10 -10
  22. package/esm2022/src/form_providers.mjs +8 -8
  23. package/esm2022/src/version.mjs +1 -1
  24. package/fesm2022/forms.mjs +126 -126
  25. package/fesm2022/forms.mjs.map +1 -1
  26. package/index.d.ts +13 -3
  27. package/package.json +4 -4
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v16.0.0-next.5
2
+ * @license Angular v16.0.0-next.6
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -4675,6 +4675,10 @@ declare const SHARED_FORM_DIRECTIVES: Type<any>[];
4675
4675
 
4676
4676
  declare const TEMPLATE_DRIVEN_DIRECTIVES: Type<any>[];
4677
4677
 
4678
+ declare interface UnsafeValidatorFn {
4679
+ (control: AbstractControl): ValidationErrors | null;
4680
+ }
4681
+
4678
4682
  /**
4679
4683
  * UntypedFormArray is a non-strongly-typed version of `FormArray`, which
4680
4684
  * permits heterogenous controls.
@@ -4816,17 +4820,23 @@ export declare interface Validator {
4816
4820
  /**
4817
4821
  * The union of all validator types that can be accepted by a ControlConfig.
4818
4822
  */
4819
- declare type ValidatorConfig = ValidatorFn | AsyncValidatorFn | ValidatorFn[] | AsyncValidatorFn[];
4823
+ declare type ValidatorConfig = UnsafeValidatorFn | AsyncValidatorFn | UnsafeValidatorFn[] | AsyncValidatorFn[];
4820
4824
 
4821
4825
  /**
4822
4826
  * @description
4823
4827
  * A function that receives a control and synchronously returns a map of
4824
4828
  * validation errors if present, otherwise null.
4825
4829
  *
4830
+ * Error objects with a `then` key or a `subscribe` key are not valid.
4831
+ * They describe an async validator returning respectively a Promise or an Observable.
4832
+ *
4826
4833
  * @publicApi
4827
4834
  */
4828
4835
  export declare interface ValidatorFn {
4829
- (control: AbstractControl): ValidationErrors | null;
4836
+ (control: AbstractControl): (ValidationErrors & {
4837
+ then?: never;
4838
+ subscribe?: never;
4839
+ }) | null;
4830
4840
  }
4831
4841
 
4832
4842
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/forms",
3
- "version": "16.0.0-next.5",
3
+ "version": "16.0.0-next.6",
4
4
  "description": "Angular - directives and services for creating forms",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -11,9 +11,9 @@
11
11
  "tslib": "^2.3.0"
12
12
  },
13
13
  "peerDependencies": {
14
- "@angular/core": "16.0.0-next.5",
15
- "@angular/common": "16.0.0-next.5",
16
- "@angular/platform-browser": "16.0.0-next.5",
14
+ "@angular/core": "16.0.0-next.6",
15
+ "@angular/common": "16.0.0-next.6",
16
+ "@angular/platform-browser": "16.0.0-next.6",
17
17
  "rxjs": "^6.5.3 || ^7.4.0"
18
18
  },
19
19
  "repository": {