Skip to content

Commit 69716ad

Browse files
lunaleapsfacebook-github-bot
authored andcommitted
Make PanResponder an ES Module
Summary: Changelog: [General][Changed] ESM PanResponder Reviewed By: christophpurrer Differential Revision: D42272981 fbshipit-source-id: 1191e8f3425aed024b77365da1ad42f44099e94a
1 parent 573734f commit 69716ad

File tree

3 files changed

+3
-261
lines changed

3 files changed

+3
-261
lines changed

Libraries/Interaction/PanResponder.flow.js

Lines changed: 0 additions & 257 deletions
This file was deleted.

Libraries/Interaction/PanResponder.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
'use strict';
1212

1313
import type {PressEvent} from '../Types/CoreEventTypes';
14-
import type {PanResponderType} from './PanResponder.flow.js';
1514

1615
const InteractionManager = require('./InteractionManager');
1716
const TouchHistoryMath = require('./TouchHistoryMath');
@@ -227,7 +226,7 @@ type PanResponderConfig = $ReadOnly<{|
227226
onShouldBlockNativeResponder?: ?ActiveCallback,
228227
|}>;
229228

230-
const PanResponder: PanResponderType = {
229+
const PanResponder = {
231230
/**
232231
*
233232
* A graphical explanation of the touch data flow:
@@ -580,4 +579,4 @@ export type PanResponderInstance = $Call<
580579
PanResponderConfig,
581580
>;
582581

583-
module.exports = PanResponder;
582+
export default PanResponder;

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ module.exports = {
285285
return require('./Libraries/Network/RCTNetworking').default;
286286
},
287287
get PanResponder(): PanResponder {
288-
return require('./Libraries/Interaction/PanResponder');
288+
return require('./Libraries/Interaction/PanResponder').default;
289289
},
290290
get PermissionsAndroid(): PermissionsAndroid {
291291
return require('./Libraries/PermissionsAndroid/PermissionsAndroid');

0 commit comments

Comments
 (0)