@samitouri / QOS-React / commits / fe7890d569

Revert recent Flow changes

Dan Abramov committed May 15, 2018 at 15:03 UTC fe7890d569c5aa94c371bdb27c5db7bde4ec385a
3 files changed +7 -6
packages/events/PluginModuleType.js
+1 -1
@@ -12,7 +12,7 @@ import type {
12 DispatchConfig,
13 ReactSyntheticEvent,
14 } from './ReactSyntheticEventType';
15 -import type {TopLevelType} from 'events/TopLevelEventTypes';
15 +import type {TopLevelType} from './TopLevelEventTypes';
16
17 export type EventTypes = {[key: string]: DispatchConfig};
18
packages/react-dom/src/events/ReactDOMEventListener.js
+2 -2
@@ -9,7 +9,7 @@
9
10 import type {AnyNativeEvent} from 'events/PluginModuleType';
11 import type {Fiber} from 'react-reconciler/src/ReactFiber';
12 -import type {DOMTopLevelEventType} from 'react-dom/src/events/DOMTopLevelEventTypes';
12 +import type {DOMTopLevelEventType} from './DOMTopLevelEventTypes';
13
14 import {batchedUpdates, interactiveUpdates} from 'events/ReactGenericBatching';
15 import {runExtractedEventsInBatch} from 'events/EventPluginHub';
@@ -20,7 +20,7 @@ import {addEventBubbleListener, addEventCaptureListener} from './EventListener';
20 import getEventTarget from './getEventTarget';
21 import {getClosestInstanceFromNode} from '../client/ReactDOMComponentTree';
22 import SimpleEventPlugin from './SimpleEventPlugin';
23 -import {getRawEventName} from 'react-dom/src/events/DOMTopLevelEventTypes';
23 +import {getRawEventName} from './DOMTopLevelEventTypes';
24
25 const {isInteractiveTopLevelEventType} = SimpleEventPlugin;
26
packages/react-dom/src/events/SimpleEventPlugin.js
+4 -3
@@ -8,6 +8,7 @@
8 */
9
10 import type {TopLevelType} from 'events/TopLevelEventTypes';
11 +import type {DOMTopLevelEventType} from './DOMTopLevelEventTypes';
12 import type {
13 DispatchConfig,
14 ReactSyntheticEvent,
@@ -18,7 +19,7 @@ import type {EventTypes, PluginModule} from 'events/PluginModuleType';
19 import {accumulateTwoPhaseDispatches} from 'events/EventPropagators';
20 import SyntheticEvent from 'events/SyntheticEvent';
21
21 -import * as DOMTopLevelEventTypes from 'react-dom/src/events/DOMTopLevelEventTypes';
22 +import * as DOMTopLevelEventTypes from './DOMTopLevelEventTypes';
23 import warning from 'fbjs/lib/warning';
24
25 import SyntheticAnimationEvent from './SyntheticAnimationEvent';
@@ -51,7 +52,7 @@ import getEventCharCode from './getEventCharCode';
52 * [TOP_ABORT, { sameConfig }],
53 * ]);
54 */
54 -type EventTuple = [TopLevelType, string];
55 +type EventTuple = [DOMTopLevelEventType, string];
56 const interactiveEventTypeNames: Array<EventTuple> = [
57 [DOMTopLevelEventTypes.TOP_BLUR, 'blur'],
58 [DOMTopLevelEventTypes.TOP_CANCEL, 'cancel'],
@@ -154,7 +155,7 @@ nonInteractiveEventTypeNames.forEach(eventTuple => {
155 });
156
157 // Only used in DEV for exhaustiveness validation.
157 -const knownHTMLTopLevelTypes: Array<TopLevelType> = [
158 +const knownHTMLTopLevelTypes: Array<DOMTopLevelEventType> = [
159 DOMTopLevelEventTypes.TOP_ABORT,
160 DOMTopLevelEventTypes.TOP_CANCEL,
161 DOMTopLevelEventTypes.TOP_CAN_PLAY,