Commit 738a33c
fix: ensure SwipeDirection is imported as a value in ReanimatedSwipeable (#3666)
**Summary**
Fixes `SwipeDirection` being `undefined` at runtime in
`ReanimatedSwipeable` when the package
is consumed from TypeScript source (e.g. in some Metro configs).
**Details**
`SwipeDirection` was imported from the local barrel (`./index.ts`),
which re-exports it
as a type-only export. This removes the value in the compiled JS,
causing it to be `undefined`
at runtime.
This PR imports `SwipeDirection` directly from
`ReanimatedSwipeableProps`, which exports it
as a value.
See closed issue for details:
[#3665](#3665)
**Impact**
No API changes. Only affects internal import, ensures enum value is
present at runtime.
---------
Co-authored-by: Christian Bach <christian.bach@carnegie.se>1 parent 676d0d7 commit 738a33c
File tree
1 file changed
+5
-1
lines changed- packages/react-native-gesture-handler/src/components/ReanimatedSwipeable
1 file changed
+5
-1
lines changedLines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
| |||
0 commit comments