Skip to content

Commit

Permalink
Revert recent Flow changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed May 15, 2018
1 parent 7ba1abe commit fe7890d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/events/PluginModuleType.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type {
DispatchConfig,
ReactSyntheticEvent,
} from './ReactSyntheticEventType';
import type {TopLevelType} from 'events/TopLevelEventTypes';
import type {TopLevelType} from './TopLevelEventTypes';

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

Expand Down
4 changes: 2 additions & 2 deletions packages/react-dom/src/events/ReactDOMEventListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

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

import {batchedUpdates, interactiveUpdates} from 'events/ReactGenericBatching';
import {runExtractedEventsInBatch} from 'events/EventPluginHub';
Expand All @@ -20,7 +20,7 @@ import {addEventBubbleListener, addEventCaptureListener} from './EventListener';
import getEventTarget from './getEventTarget';
import {getClosestInstanceFromNode} from '../client/ReactDOMComponentTree';
import SimpleEventPlugin from './SimpleEventPlugin';
import {getRawEventName} from 'react-dom/src/events/DOMTopLevelEventTypes';
import {getRawEventName} from './DOMTopLevelEventTypes';

const {isInteractiveTopLevelEventType} = SimpleEventPlugin;

Expand Down
7 changes: 4 additions & 3 deletions packages/react-dom/src/events/SimpleEventPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

import type {TopLevelType} from 'events/TopLevelEventTypes';
import type {DOMTopLevelEventType} from './DOMTopLevelEventTypes';
import type {
DispatchConfig,
ReactSyntheticEvent,
Expand All @@ -18,7 +19,7 @@ import type {EventTypes, PluginModule} from 'events/PluginModuleType';
import {accumulateTwoPhaseDispatches} from 'events/EventPropagators';
import SyntheticEvent from 'events/SyntheticEvent';

import * as DOMTopLevelEventTypes from 'react-dom/src/events/DOMTopLevelEventTypes';
import * as DOMTopLevelEventTypes from './DOMTopLevelEventTypes';
import warning from 'fbjs/lib/warning';

import SyntheticAnimationEvent from './SyntheticAnimationEvent';
Expand Down Expand Up @@ -51,7 +52,7 @@ import getEventCharCode from './getEventCharCode';
* [TOP_ABORT, { sameConfig }],
* ]);
*/
type EventTuple = [TopLevelType, string];
type EventTuple = [DOMTopLevelEventType, string];
const interactiveEventTypeNames: Array<EventTuple> = [
[DOMTopLevelEventTypes.TOP_BLUR, 'blur'],
[DOMTopLevelEventTypes.TOP_CANCEL, 'cancel'],
Expand Down Expand Up @@ -154,7 +155,7 @@ nonInteractiveEventTypeNames.forEach(eventTuple => {
});

// Only used in DEV for exhaustiveness validation.
const knownHTMLTopLevelTypes: Array<TopLevelType> = [
const knownHTMLTopLevelTypes: Array<DOMTopLevelEventType> = [
DOMTopLevelEventTypes.TOP_ABORT,
DOMTopLevelEventTypes.TOP_CANCEL,
DOMTopLevelEventTypes.TOP_CAN_PLAY,
Expand Down

0 comments on commit fe7890d

Please sign in to comment.