Skip to content

Commit fe7890d

Browse files
committed
Revert recent Flow changes
1 parent 7ba1abe commit fe7890d

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

packages/events/PluginModuleType.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import type {
1212
DispatchConfig,
1313
ReactSyntheticEvent,
1414
} from './ReactSyntheticEventType';
15-
import type {TopLevelType} from 'events/TopLevelEventTypes';
15+
import type {TopLevelType} from './TopLevelEventTypes';
1616

1717
export type EventTypes = {[key: string]: DispatchConfig};
1818

packages/react-dom/src/events/ReactDOMEventListener.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import type {AnyNativeEvent} from 'events/PluginModuleType';
1111
import type {Fiber} from 'react-reconciler/src/ReactFiber';
12-
import type {DOMTopLevelEventType} from 'react-dom/src/events/DOMTopLevelEventTypes';
12+
import type {DOMTopLevelEventType} from './DOMTopLevelEventTypes';
1313

1414
import {batchedUpdates, interactiveUpdates} from 'events/ReactGenericBatching';
1515
import {runExtractedEventsInBatch} from 'events/EventPluginHub';
@@ -20,7 +20,7 @@ import {addEventBubbleListener, addEventCaptureListener} from './EventListener';
2020
import getEventTarget from './getEventTarget';
2121
import {getClosestInstanceFromNode} from '../client/ReactDOMComponentTree';
2222
import SimpleEventPlugin from './SimpleEventPlugin';
23-
import {getRawEventName} from 'react-dom/src/events/DOMTopLevelEventTypes';
23+
import {getRawEventName} from './DOMTopLevelEventTypes';
2424

2525
const {isInteractiveTopLevelEventType} = SimpleEventPlugin;
2626

packages/react-dom/src/events/SimpleEventPlugin.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99

1010
import type {TopLevelType} from 'events/TopLevelEventTypes';
11+
import type {DOMTopLevelEventType} from './DOMTopLevelEventTypes';
1112
import type {
1213
DispatchConfig,
1314
ReactSyntheticEvent,
@@ -18,7 +19,7 @@ import type {EventTypes, PluginModule} from 'events/PluginModuleType';
1819
import {accumulateTwoPhaseDispatches} from 'events/EventPropagators';
1920
import SyntheticEvent from 'events/SyntheticEvent';
2021

21-
import * as DOMTopLevelEventTypes from 'react-dom/src/events/DOMTopLevelEventTypes';
22+
import * as DOMTopLevelEventTypes from './DOMTopLevelEventTypes';
2223
import warning from 'fbjs/lib/warning';
2324

2425
import SyntheticAnimationEvent from './SyntheticAnimationEvent';
@@ -51,7 +52,7 @@ import getEventCharCode from './getEventCharCode';
5152
* [TOP_ABORT, { sameConfig }],
5253
* ]);
5354
*/
54-
type EventTuple = [TopLevelType, string];
55+
type EventTuple = [DOMTopLevelEventType, string];
5556
const interactiveEventTypeNames: Array<EventTuple> = [
5657
[DOMTopLevelEventTypes.TOP_BLUR, 'blur'],
5758
[DOMTopLevelEventTypes.TOP_CANCEL, 'cancel'],
@@ -154,7 +155,7 @@ nonInteractiveEventTypeNames.forEach(eventTuple => {
154155
});
155156

156157
// Only used in DEV for exhaustiveness validation.
157-
const knownHTMLTopLevelTypes: Array<TopLevelType> = [
158+
const knownHTMLTopLevelTypes: Array<DOMTopLevelEventType> = [
158159
DOMTopLevelEventTypes.TOP_ABORT,
159160
DOMTopLevelEventTypes.TOP_CANCEL,
160161
DOMTopLevelEventTypes.TOP_CAN_PLAY,

0 commit comments

Comments
 (0)