Repository navigation
Commit 771d52d
Check Animated allowlist literals against supported key types
Summary:
## Context
Annotating allowlist literals as arbitrary string dictionaries loses their exact keys and accepts spelling mistakes. These lists should be checked against the style, transform and interpolation type domains while preserving their inferred literal shapes.
## Changes
- Check color, style, transform and interpolation allowlists with satisfies and finite key domains derived from their source types, using as const to retain true literal values in both OSS and internal Flow.
- Collect transform keys distributively across the transform union, preserving support for matrix and the four legacy transform-style keys.
- Keep existing feature-flag gating and the public allowlist export type unchanged.
- Preserve runtime output exactly; the constraints validate list entries, not completeness or native-backend support.
Flow configurations that check React Native implementation source need `experimental.tslib_syntax=true` for satisfies; React Native's validation configuration enables it.
Changelog: [Internal]
Differential Revision: D1329340911 parent fb7549c commit 771d52d
1 file changed
Lines changed: 48 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
11 | 22 | | |
12 | 23 | | |
13 | 24 | | |
14 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
15 | 52 | | |
16 | 53 | | |
17 | 54 | | |
18 | 55 | | |
19 | 56 | | |
20 | 57 | | |
21 | | - | |
| 58 | + | |
22 | 59 | | |
23 | 60 | | |
24 | 61 | | |
| |||
29 | 66 | | |
30 | 67 | | |
31 | 68 | | |
32 | | - | |
| 69 | + | |
33 | 70 | | |
34 | | - | |
| 71 | + | |
35 | 72 | | |
36 | 73 | | |
37 | 74 | | |
| |||
61 | 98 | | |
62 | 99 | | |
63 | 100 | | |
64 | | - | |
| 101 | + | |
65 | 102 | | |
66 | 103 | | |
67 | 104 | | |
| |||
114 | 151 | | |
115 | 152 | | |
116 | 153 | | |
117 | | - | |
| 154 | + | |
118 | 155 | | |
119 | | - | |
| 156 | + | |
120 | 157 | | |
121 | | - | |
| 158 | + | |
122 | 159 | | |
123 | 160 | | |
124 | 161 | | |
| |||
132 | 169 | | |
133 | 170 | | |
134 | 171 | | |
135 | | - | |
| 172 | + | |
136 | 173 | | |
137 | | - | |
| 174 | + | |
138 | 175 | | |
139 | | - | |
| 176 | + | |
140 | 177 | | |
141 | 178 | | |
142 | 179 | | |
143 | 180 | | |
144 | 181 | | |
145 | 182 | | |
146 | | - | |
| 183 | + | |
147 | 184 | | |
148 | 185 | | |
149 | 186 | | |
| |||
0 commit comments