Commit 1a94b0c
committed
Remove Touchable (base) from public API (#57476)
Summary:
Pull Request resolved: #57476
NOTE: Resubmission of D110488985.
**Motivation**
The public type for `Touchable` has zero overlap with its runtime value. This is an internal implementation object which is undocumented.
https://www.internalfb.com/code/fbsource/[86267213ee84]/xplat/js/react-native-github/packages/react-native/Libraries/Components/Touchable/Touchable.d.ts?lines=18-24
https://www.internalfb.com/code/fbsource/[86267213ee84]/xplat/js/react-native-github/packages/react-native/Libraries/Components/Touchable/Touchable.js?lines=966-986
Replaces D110483989 / #57419.
**Impact**
This is a **breaking change** with few open source consumers. The `onTouchStart` etc prop typings are part of `ViewProps` today, which is a suitable replacement.
Across projects I've been testing for the Strict TypeScript API rollout, the only load bearing consumer was Uniwind — where I've sent a PR to address this.
- uni-stack/uniwind#592.
Changelog:
[General][Breaking] - The `Touchable` root export (undocumented) is removed. If you are extending `Touchable` as a type, please use `ViewProps` instead.
Reviewed By: rubennorte
Differential Revision: D111022549
fbshipit-source-id: bf29ae826d34fb04889b9f56de0f11904fce3f531 parent a103ec2 commit 1a94b0c
4 files changed
Lines changed: 16 additions & 72 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | 406 | | |
417 | 407 | | |
418 | 408 | | |
| |||
456 | 446 | | |
457 | 447 | | |
458 | 448 | | |
459 | | - | |
460 | 449 | | |
461 | 450 | | |
462 | 451 | | |
| |||
468 | 457 | | |
469 | 458 | | |
470 | 459 | | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | 460 | | |
499 | 461 | | |
500 | 462 | | |
| |||
5371 | 5333 | | |
5372 | 5334 | | |
5373 | 5335 | | |
5374 | | - | |
5375 | 5336 | | |
5376 | 5337 | | |
5377 | 5338 | | |
| |||
5478 | 5439 | | |
5479 | 5440 | | |
5480 | 5441 | | |
5481 | | - | |
5482 | | - | |
5483 | | - | |
5484 | | - | |
5485 | | - | |
5486 | | - | |
5487 | | - | |
5488 | | - | |
5489 | | - | |
5490 | 5442 | | |
5491 | 5443 | | |
5492 | 5444 | | |
| |||
6174 | 6126 | | |
6175 | 6127 | | |
6176 | 6128 | | |
6177 | | - | |
6178 | 6129 | | |
6179 | 6130 | | |
6180 | 6131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | 127 | | |
129 | 128 | | |
130 | 129 | | |
| |||
487 | 486 | | |
488 | 487 | | |
489 | 488 | | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | 489 | | |
507 | 490 | | |
508 | 491 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | 152 | | |
156 | 153 | | |
157 | 154 | | |
| |||
412 | 409 | | |
413 | 410 | | |
414 | 411 | | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
415 | 427 | | |
416 | 428 | | |
417 | 429 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
179 | | - | |
180 | 178 | | |
181 | 179 | | |
182 | 180 | | |
| |||
0 commit comments