Skip to content

Commit

Permalink
Make PanResponder an ES Module
Browse files Browse the repository at this point in the history
Summary: Changelog: [General][Changed] ESM PanResponder

Reviewed By: christophpurrer

Differential Revision: D42272981

fbshipit-source-id: 1191e8f3425aed024b77365da1ad42f44099e94a
  • Loading branch information
lunaleaps authored and facebook-github-bot committed Jan 11, 2023
1 parent 573734f commit 69716ad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 261 deletions.
257 changes: 0 additions & 257 deletions Libraries/Interaction/PanResponder.flow.js

This file was deleted.

5 changes: 2 additions & 3 deletions Libraries/Interaction/PanResponder.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
'use strict';

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

const InteractionManager = require('./InteractionManager');
const TouchHistoryMath = require('./TouchHistoryMath');
Expand Down Expand Up @@ -227,7 +226,7 @@ type PanResponderConfig = $ReadOnly<{|
onShouldBlockNativeResponder?: ?ActiveCallback,
|}>;

const PanResponder: PanResponderType = {
const PanResponder = {
/**
*
* A graphical explanation of the touch data flow:
Expand Down Expand Up @@ -580,4 +579,4 @@ export type PanResponderInstance = $Call<
PanResponderConfig,
>;

module.exports = PanResponder;
export default PanResponder;
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ module.exports = {
return require('./Libraries/Network/RCTNetworking').default;
},
get PanResponder(): PanResponder {
return require('./Libraries/Interaction/PanResponder');
return require('./Libraries/Interaction/PanResponder').default;
},
get PermissionsAndroid(): PermissionsAndroid {
return require('./Libraries/PermissionsAndroid/PermissionsAndroid');
Expand Down

0 comments on commit 69716ad

Please sign in to comment.