77 * @flow
88 */
99
10- import type { ResponderEvent , ResponderContext } from 'events/EventTypes' ;
10+ import type {
11+ ReactResponderEvent ,
12+ ReactResponderContext ,
13+ } from 'shared/ReactTypes' ;
1114import { REACT_EVENT_COMPONENT_TYPE } from 'shared/ReactSymbols' ;
1215
1316type PressProps = {
@@ -89,7 +92,7 @@ function createPressEvent(
8992}
9093
9194function dispatchEvent (
92- context : ResponderContext ,
95+ context : ReactResponderContext ,
9396 state : PressState ,
9497 name : PressEventType ,
9598 listener : ( e : Object ) = > void ,
@@ -100,7 +103,7 @@ function dispatchEvent(
100103}
101104
102105function dispatchPressChangeEvent (
103- context : ResponderContext ,
106+ context : ReactResponderContext ,
104107 props : PressProps ,
105108 state : PressState ,
106109) : void {
@@ -111,7 +114,7 @@ function dispatchPressChangeEvent(
111114}
112115
113116function dispatchLongPressChangeEvent (
114- context : ResponderContext ,
117+ context : ReactResponderContext ,
115118 props : PressProps ,
116119 state : PressState ,
117120) : void {
@@ -150,7 +153,7 @@ function deactivate(context, props, state) {
150153}
151154
152155function dispatchPressStartEvents (
153- context : ResponderContext ,
156+ context : ReactResponderContext ,
154157 props : PressProps ,
155158 state : PressState ,
156159) : void {
@@ -212,7 +215,7 @@ function dispatchPressStartEvents(
212215}
213216
214217function dispatchPressEndEvents (
215- context : ResponderContext ,
218+ context : ReactResponderContext ,
216219 props : PressProps ,
217220 state : PressState ,
218221) : void {
@@ -265,7 +268,7 @@ function calculateDelayMS(delay: ?number, min = 0, fallback = 0) {
265268}
266269
267270function unmountResponder (
268- context : ResponderContext ,
271+ context : ReactResponderContext ,
269272 props : PressProps ,
270273 state : PressState ,
271274) : void {
@@ -293,8 +296,8 @@ const PressResponder = {
293296 } ;
294297 } ,
295298 onEvent (
296- event : ResponderEvent ,
297- context : ResponderContext ,
299+ event : ReactResponderEvent ,
300+ context : ReactResponderContext ,
298301 props : PressProps ,
299302 state : PressState ,
300303 ) : void {
@@ -491,12 +494,16 @@ const PressResponder = {
491494 }
492495 }
493496 } ,
494- onUnmount ( context : ResponderContext , props : PressProps , state : PressState ) {
497+ onUnmount (
498+ context : ReactResponderContext ,
499+ props : PressProps ,
500+ state : PressState ,
501+ ) {
495502 unmountResponder ( context , props , state ) ;
496503 } ,
497504 // TODO This method doesn't work as of yet
498505 onOwnershipChange (
499- context : ResponderContext ,
506+ context : ReactResponderContext ,
500507 props : PressProps ,
501508 state : PressState ,
502509 ) {
0 commit comments