Skip to content

Commit f1c117b

Browse files
authored
Move types to type exports (#1389)
Babel TS types plugin doesn't check if something is a value or a type so types in export weren't stripped.
1 parent c1b8a5b commit f1c117b

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

src/index.ts

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ export { Directions } from './Directions';
22
export { State } from './State';
33
export { default as gestureHandlerRootHOC } from './gestureHandlerRootHOC';
44
export { default as GestureHandlerRootView } from './GestureHandlerRootView';
5-
6-
export {
5+
export type {
76
// event types
87
GestureEvent,
98
HandlerStateChangeEvent,
@@ -25,7 +24,8 @@ export {
2524
PinchGestureHandlerProps,
2625
RotationGestureHandlerProps,
2726
FlingGestureHandlerProps,
28-
// gesture handlers
27+
} from './handlers/gestureHandlers';
28+
export {
2929
TapGestureHandler,
3030
ForceTouchGestureHandler,
3131
LongPressGestureHandler,
@@ -35,19 +35,18 @@ export {
3535
FlingGestureHandler,
3636
} from './handlers/gestureHandlers';
3737
export { default as createNativeWrapper } from './handlers/createNativeWrapper';
38-
export {
39-
NativeViewGestureHandler,
38+
export type {
4039
NativeViewGestureHandlerPayload,
4140
NativeViewGestureHandlerProps,
4241
} from './handlers/NativeViewGestureHandler';
43-
44-
export {
45-
// buttons props
42+
export { NativeViewGestureHandler } from './handlers/NativeViewGestureHandler';
43+
export type {
4644
RawButtonProps,
4745
BaseButtonProps,
4846
RectButtonProps,
4947
BorderlessButtonProps,
50-
// buttons
48+
} from './components/GestureButtons';
49+
export {
5150
RawButton,
5251
BaseButton,
5352
RectButton,
@@ -66,7 +65,7 @@ export {
6665
DrawerLayoutAndroid,
6766
FlatList,
6867
} from './components/GestureComponents';
69-
export {
68+
export type {
7069
//events
7170
GestureHandlerGestureEvent,
7271
GestureHandlerStateChangeEvent,
@@ -98,20 +97,20 @@ export {
9897
RotationGestureHandlerProperties,
9998
FlingGestureHandlerProperties,
10099
ForceTouchGestureHandlerProperties,
101-
// buttons
100+
// buttons props
102101
RawButtonProperties,
103102
BaseButtonProperties,
104103
RectButtonProperties,
105104
BorderlessButtonProperties,
106105
} from './handlers/gestureHandlerTypesCompat';
107106

108107
export { default as Swipeable } from './components/Swipeable';
109-
export {
110-
default as DrawerLayout,
108+
export type {
111109
DrawerLayoutProps,
112110
DrawerPosition,
113111
DrawerState,
114112
DrawerType,
115113
DrawerLockMode,
116114
DrawerKeyboardDismissMode,
117115
} from './components/DrawerLayout';
116+
export { default as DrawerLayout } from './components/DrawerLayout';

0 commit comments

Comments
 (0)