Commit fa0ffed
Align public type for Touchable
Summary:
**Problem**
Under the Strict TypeScript API, `Touchable` was a value-only TypeScript export referencing `TouchableImpl`, which leaked additional `{Mixin, renderDebugView}` members.
**Fix**
Export a declaration-merged `Touchable` type at root, specifying a public interface for this module that excludes these members.
**Impact**
- API snapshot cleanup: Hides internal `TouchableImpl` and `TouchableMixinImpl` details.
- **Functional**: Removes `Touchable.renderDebugView()` from the public API. This is **non-breaking** as this type was not previously modelled under the manual TS types.
- **Functional**: Fixes equivalence of `Touchable` when referenced as a type under Uniwind — which was a breaking change vs the manual TS types (extra props were leaked).
https://github.com/uni-stack/uniwind/blob/6b498f2ada673d2b92915c79a703286078b953c2/packages/uniwind/types.d.ts#L40
**Notes**
- As part of this change, other `Libraries/`/`*Impl` APIs were audited to check for similar internal API leaks. This is the only obvious instance.
- Also simplify outdated doc comment (`Touchable` subtypes are intended for primary use and have separate docs pages).
Changelog:
[General][Fixed] - **Strict TypeScript API**: Export a public `Touchable` type object, reducing its API to match the previous manual types
Differential Revision: D1104839891 parent 2fb4f13 commit fa0ffed
3 files changed
Lines changed: 28 additions & 134 deletions
File tree
- packages/react-native
- Libraries/Components/Touchable
Lines changed: 18 additions & 84 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
27 | 45 | | |
28 | 46 | | |
29 | 47 | | |
| |||
879 | 897 | | |
880 | 898 | | |
881 | 899 | | |
882 | | - | |
883 | | - | |
884 | | - | |
885 | | - | |
886 | | - | |
887 | | - | |
888 | | - | |
889 | | - | |
890 | | - | |
891 | | - | |
892 | | - | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | | - | |
897 | | - | |
898 | | - | |
899 | | - | |
900 | | - | |
901 | | - | |
902 | | - | |
903 | | - | |
904 | | - | |
905 | | - | |
906 | | - | |
907 | | - | |
908 | | - | |
909 | | - | |
910 | | - | |
911 | | - | |
912 | | - | |
913 | | - | |
914 | | - | |
915 | | - | |
916 | | - | |
917 | | - | |
918 | | - | |
919 | | - | |
920 | | - | |
921 | | - | |
922 | | - | |
923 | | - | |
924 | | - | |
925 | | - | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
930 | | - | |
931 | | - | |
932 | | - | |
933 | | - | |
934 | | - | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
947 | | - | |
948 | | - | |
949 | | - | |
950 | | - | |
951 | | - | |
952 | | - | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | | - | |
959 | | - | |
960 | | - | |
961 | | - | |
962 | | - | |
963 | | - | |
964 | | - | |
965 | | - | |
966 | 900 | | |
967 | 901 | | |
968 | 902 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | 402 | | |
413 | 403 | | |
414 | 404 | | |
| |||
452 | 442 | | |
453 | 443 | | |
454 | 444 | | |
455 | | - | |
456 | 445 | | |
457 | 446 | | |
458 | 447 | | |
| |||
464 | 453 | | |
465 | 454 | | |
466 | 455 | | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | 456 | | |
495 | 457 | | |
496 | 458 | | |
| |||
5353 | 5315 | | |
5354 | 5316 | | |
5355 | 5317 | | |
5356 | | - | |
| 5318 | + | |
| 5319 | + | |
| 5320 | + | |
| 5321 | + | |
| 5322 | + | |
| 5323 | + | |
| 5324 | + | |
5357 | 5325 | | |
5358 | 5326 | | |
5359 | 5327 | | |
| |||
5460 | 5428 | | |
5461 | 5429 | | |
5462 | 5430 | | |
5463 | | - | |
5464 | | - | |
5465 | | - | |
5466 | | - | |
5467 | | - | |
5468 | | - | |
5469 | | - | |
5470 | | - | |
5471 | | - | |
5472 | 5431 | | |
5473 | 5432 | | |
5474 | 5433 | | |
| |||
6153 | 6112 | | |
6154 | 6113 | | |
6155 | 6114 | | |
6156 | | - | |
| 6115 | + | |
6157 | 6116 | | |
6158 | 6117 | | |
6159 | 6118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
| |||
0 commit comments