Commit 377d2de
authored
fix: inline FlashListProps to remove @shopify/flash-list type dependency (#2620)(by @YevheniiKotyrlo)
The published BottomSheetFlashList.d.ts unconditionally imports from
@shopify/flash-list, but flash-list is not declared in any dependency
field. Consumers who don't install flash-list get TS2307 because
TypeScript strips @ts-ignore from emitted .d.ts files (by design,
confirmed in TypeScript #38628).
Replace the external type import with a minimal local interface
extending FlatListProps<T> from react-native. The runtime try/catch
require('@shopify/flash-list') is unchanged -- only types are affected.
Fixes #23901 parent 0a0a060 commit 377d2de
1 file changed
Lines changed: 10 additions & 3 deletions
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | | - | |
| 2 | + | |
5 | 3 | | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
12 | 19 | | |
13 | 20 | | |
14 | 21 | | |
| |||
0 commit comments