Skip to content

Commit 0c34969

Browse files
author
Brian Vaughn
committed
Removed Flow generic annotations for createResponder
This seems to cause a parsing error. (Not sure why.) The API is deprecated anyway so I'm being lazy for now and just adding a .
1 parent 24f5ac6 commit 0c34969

File tree

7 files changed

+40
-32
lines changed

7 files changed

+40
-32
lines changed

packages/react-interactions/events/src/dom/ContextMenu.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,11 @@ const contextMenuImpl = {
113113
},
114114
};
115115

116-
export const ContextMenuResponder = React.DEPRECATED_createResponder<
117-
ReactDOMResponderEvent,
118-
ReactDOMResponderContext,
119-
>('ContextMenu', contextMenuImpl);
116+
// $FlowFixMe Can't add generic types without causing a parsing/syntax errors
117+
export const ContextMenuResponder = React.DEPRECATED_createResponder(
118+
'ContextMenu',
119+
contextMenuImpl,
120+
);
120121

121122
export function useContextMenu(
122123
props: ContextMenuProps,

packages/react-interactions/events/src/dom/Focus.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -494,10 +494,11 @@ const focusResponderImpl = {
494494
},
495495
};
496496

497-
export const FocusResponder = React.DEPRECATED_createResponder<
498-
ReactDOMResponderEvent,
499-
ReactDOMResponderContext,
500-
>('Focus', focusResponderImpl);
497+
// $FlowFixMe Can't add generic types without causing a parsing/syntax errors
498+
export const FocusResponder = React.DEPRECATED_createResponder(
499+
'Focus',
500+
focusResponderImpl,
501+
);
501502

502503
export function useFocus(
503504
props: FocusProps,
@@ -680,10 +681,11 @@ const focusWithinResponderImpl = {
680681
},
681682
};
682683

683-
export const FocusWithinResponder = React.DEPRECATED_createResponder<
684-
ReactDOMResponderEvent,
685-
ReactDOMResponderContext,
686-
>('FocusWithin', focusWithinResponderImpl);
684+
// $FlowFixMe Can't add generic types without causing a parsing/syntax errors
685+
export const FocusWithinResponder = React.DEPRECATED_createResponder(
686+
'FocusWithin',
687+
focusWithinResponderImpl,
688+
);
687689

688690
export function useFocusWithin(
689691
props: FocusWithinProps,

packages/react-interactions/events/src/dom/Hover.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,10 +378,11 @@ const hoverResponderFallbackImpl = {
378378
onUnmount: unmountResponder,
379379
};
380380

381-
export const HoverResponder = React.DEPRECATED_createResponder<
382-
ReactDOMResponderEvent,
383-
ReactDOMResponderContext,
384-
>('Hover', hasPointerEvents ? hoverResponderImpl : hoverResponderFallbackImpl);
381+
// $FlowFixMe Can't add generic types without causing a parsing/syntax errors
382+
export const HoverResponder = React.DEPRECATED_createResponder(
383+
'Hover',
384+
hasPointerEvents ? hoverResponderImpl : hoverResponderFallbackImpl,
385+
);
385386

386387
export function useHover(
387388
props: HoverProps,

packages/react-interactions/events/src/dom/Input.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,11 @@ const inputResponderImpl = {
212212
},
213213
};
214214

215-
export const InputResponder = React.DEPRECATED_createResponder<
216-
ReactDOMResponderEvent,
217-
ReactDOMResponderContext,
218-
>('Input', inputResponderImpl);
215+
// $FlowFixMe Can't add generic types without causing a parsing/syntax errors
216+
export const InputResponder = React.DEPRECATED_createResponder(
217+
'Input',
218+
inputResponderImpl,
219+
);
219220

220221
export function useInput(
221222
props: InputResponderProps,

packages/react-interactions/events/src/dom/Keyboard.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,11 @@ const keyboardResponderImpl = {
229229
},
230230
};
231231

232-
export const KeyboardResponder = React.DEPRECATED_createResponder<
233-
ReactDOMResponderEvent,
234-
ReactDOMResponderContext,
235-
>('Keyboard', keyboardResponderImpl);
232+
// $FlowFixMe Can't add generic types without causing a parsing/syntax errors
233+
export const KeyboardResponder = React.DEPRECATED_createResponder(
234+
'Keyboard',
235+
keyboardResponderImpl,
236+
);
236237

237238
export function useKeyboard(
238239
props: KeyboardProps,

packages/react-interactions/events/src/dom/PressLegacy.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -903,10 +903,11 @@ const pressResponderImpl = {
903903
},
904904
};
905905

906-
export const PressResponder = React.DEPRECATED_createResponder<
907-
ReactDOMResponderEvent,
908-
ReactDOMResponderContext,
909-
>('Press', pressResponderImpl);
906+
// $FlowFixMe Can't add generic types without causing a parsing/syntax errors
907+
export const PressResponder = React.DEPRECATED_createResponder(
908+
'Press',
909+
pressResponderImpl,
910+
);
910911

911912
export function usePress(
912913
props: PressProps,

packages/react-interactions/events/src/dom/Tap.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -721,10 +721,11 @@ const responderImpl = {
721721
},
722722
};
723723

724-
export const TapResponder = React.DEPRECATED_createResponder<
725-
ReactDOMResponderEvent,
726-
ReactDOMResponderContext,
727-
>('Tap', responderImpl);
724+
// $FlowFixMe Can't add generic types without causing a parsing/syntax errors
725+
export const TapResponder = React.DEPRECATED_createResponder(
726+
'Tap',
727+
responderImpl,
728+
);
728729

729730
export function useTap(
730731
props: TapProps,

0 commit comments

Comments
 (0)