Commit 4255f9b
Fix missing and incorrect AccessibilityInfo types (#56708)
Summary:
Pull Request resolved: #56708
**Context**
Claude-driven audit of Flow source code vs existing public TypeScript API (manual).
**Changes**
Alignments to the `AccessibilityInfo` module for both the source Flow types and manual TS types:
- **Flow**: Move `grayscaleChanged` and `invertColorsChanged` into shared `AccessibilityEventDefinitions` — both events are registered on both platforms in the `EventNames` map.
- **TS**: Add missing event types (`accessibilityServiceChanged`, `announcementFinished`, `darkerSystemColorsChanged`, `highTextContrastChanged`, `windowStateChange`) and platform-specific JSDoc to `AccessibilityChangeEventName` members.
Changelog:
[General][Fixed] - Fix missing and incorrect types in `AccessibilityInfo` TypeScript definitions
Reviewed By: christophpurrer
Differential Revision: D104057500
fbshipit-source-id: d14795aee3d1b55b6c7c06268ae57ab95c8c97ae1 parent 2a0f595 commit 4255f9b
4 files changed
Lines changed: 45 additions & 22 deletions
File tree
- packages/react-native
- Libraries/Components/AccessibilityInfo
- types/__typetests__
Lines changed: 20 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
18 | 26 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
23 | 30 | | |
24 | 31 | | |
25 | 32 | | |
| |||
38 | 45 | | |
39 | 46 | | |
40 | 47 | | |
41 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
42 | 53 | | |
43 | 54 | | |
44 | 55 | | |
| |||
Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 31 | | |
| 32 | + | |
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
| 39 | + | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
398 | 404 | | |
399 | 405 | | |
400 | 406 | | |
401 | 407 | | |
402 | 408 | | |
403 | 409 | | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
1055 | 1055 | | |
1056 | 1056 | | |
1057 | 1057 | | |
| 1058 | + | |
| 1059 | + | |
1058 | 1060 | | |
1059 | 1061 | | |
1060 | 1062 | | |
| |||
1071 | 1073 | | |
1072 | 1074 | | |
1073 | 1075 | | |
1074 | | - | |
1075 | | - | |
1076 | 1076 | | |
1077 | 1077 | | |
1078 | 1078 | | |
| |||
6052 | 6052 | | |
6053 | 6053 | | |
6054 | 6054 | | |
6055 | | - | |
| 6055 | + | |
6056 | 6056 | | |
6057 | 6057 | | |
6058 | 6058 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1493 | 1493 | | |
1494 | 1494 | | |
1495 | 1495 | | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
1496 | 1499 | | |
1497 | 1500 | | |
1498 | 1501 | | |
| |||
1503 | 1506 | | |
1504 | 1507 | | |
1505 | 1508 | | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
1506 | 1515 | | |
1507 | 1516 | | |
1508 | 1517 | | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
1509 | 1521 | | |
1510 | 1522 | | |
1511 | 1523 | | |
| |||
0 commit comments