Commit b302797
fix(forms): Correctly infer
Type inference in cases involving `ControlConfig` was previously not working as desired. This was because the compiler was enforcing that `ControlConfig` is a *tuple* -- which is not always that easy to prove! By relaxing this constraint a bit, and just inferring from `ControlConfig` as an array, the type inference catches many more cases, and is generally more correct.
PR Close #47034FormBuilder types involving [value, validators] shorthand in more cases. (#47034)1 parent dc52cef commit b302797
File tree
2 files changed
+62
-7
lines changed- packages/forms
- src
- test
2 files changed
+62
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
26 | 41 | | |
27 | 42 | | |
28 | 43 | | |
| |||
31 | 46 | | |
32 | 47 | | |
33 | 48 | | |
34 | | - | |
35 | 49 | | |
36 | 50 | | |
37 | 51 | | |
| |||
68 | 82 | | |
69 | 83 | | |
70 | 84 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 85 | + | |
77 | 86 | | |
78 | 87 | | |
79 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1019 | 1019 | | |
1020 | 1020 | | |
1021 | 1021 | | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
1022 | 1032 | | |
1023 | 1033 | | |
1024 | 1034 | | |
| |||
1060 | 1070 | | |
1061 | 1071 | | |
1062 | 1072 | | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
1063 | 1083 | | |
1064 | 1084 | | |
1065 | 1085 | | |
| |||
1068 | 1088 | | |
1069 | 1089 | | |
1070 | 1090 | | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
1071 | 1108 | | |
1072 | 1109 | | |
1073 | 1110 | | |
| |||
1482 | 1519 | | |
1483 | 1520 | | |
1484 | 1521 | | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
1485 | 1531 | | |
1486 | 1532 | | |
1487 | 1533 | | |
| |||
0 commit comments