diff --git a/src/renderers/dom/client/eventPlugins/SimpleEventPlugin.js b/src/renderers/dom/client/eventPlugins/SimpleEventPlugin.js index 7f1e41b60d..5b30244cc6 100644 --- a/src/renderers/dom/client/eventPlugins/SimpleEventPlugin.js +++ b/src/renderers/dom/client/eventPlugins/SimpleEventPlugin.js @@ -37,7 +37,10 @@ import type { ReactSyntheticEvent, } from 'ReactSyntheticEventType'; import type {ReactInstance} from 'ReactInstanceType'; -import type {PluginModule} from 'PluginModuleType'; +import type { + EventTypes, + PluginModule, +} from 'PluginModuleType'; /** * Turns @@ -57,7 +60,7 @@ import type {PluginModule} from 'PluginModuleType'; * 'topAbort': { sameConfig } * }; */ -var eventTypes: {[key: string]: DispatchConfig} = {}; +var eventTypes: EventTypes = {}; var topLevelEventsToDispatchConfig: {[key: TopLevelTypes]: DispatchConfig} = {}; [ 'abort', diff --git a/src/renderers/dom/client/eventPlugins/TapEventPlugin.js b/src/renderers/dom/client/eventPlugins/TapEventPlugin.js index 363ecc095b..2bf0c2fa3d 100644 --- a/src/renderers/dom/client/eventPlugins/TapEventPlugin.js +++ b/src/renderers/dom/client/eventPlugins/TapEventPlugin.js @@ -21,8 +21,10 @@ var ViewportMetrics = require('ViewportMetrics'); var isStartish = EventPluginUtils.isStartish; var isEndish = EventPluginUtils.isEndish; -import type {DispatchConfig} from 'ReactSyntheticEventType'; -import type {PluginModule} from 'PluginModuleType'; +import type { + EventTypes, + PluginModule, +} from 'PluginModuleType'; import type {ReactInstance} from 'ReactInstanceType'; import type {TopLevelTypes} from 'EventConstants'; @@ -109,7 +111,7 @@ var dependencies = [ 'topMouseUp', ].concat(touchEvents); -var eventTypes: DispatchConfig = { +var eventTypes: EventTypes = { touchTap: { phasedRegistrationNames: { bubbled: 'onTouchTap', diff --git a/src/renderers/dom/client/eventPlugins/__tests__/SimpleEventPlugin-test.js b/src/renderers/dom/client/eventPlugins/__tests__/SimpleEventPlugin-test.js index e063092b37..d8f30633d1 100644 --- a/src/renderers/dom/client/eventPlugins/__tests__/SimpleEventPlugin-test.js +++ b/src/renderers/dom/client/eventPlugins/__tests__/SimpleEventPlugin-test.js @@ -128,7 +128,7 @@ describe('SimpleEventPlugin', function() { onClick.mockClear(); }); - it ('does not add a local click to interactive elements', function() { + it('does not add a local click to interactive elements', function() { var container = document.createElement('div'); ReactDOM.render(, container); @@ -140,7 +140,7 @@ describe('SimpleEventPlugin', function() { expect(onClick.mock.calls.length).toBe(0); }); - it ('adds a local click listener to non-interactive elements', function() { + it('adds a local click listener to non-interactive elements', function() { var container = document.createElement('div'); ReactDOM.render(
, container); diff --git a/src/renderers/shared/stack/event/PluginModuleType.js b/src/renderers/shared/stack/event/PluginModuleType.js index 7f22bacebc..ce00d28f94 100644 --- a/src/renderers/shared/stack/event/PluginModuleType.js +++ b/src/renderers/shared/stack/event/PluginModuleType.js @@ -18,7 +18,7 @@ import type { ReactSyntheticEvent, } from 'ReactSyntheticEventType'; -type EventTypes = {[key: string]: DispatchConfig}; +export type EventTypes = {[key: string]: DispatchConfig}; export type AnyNativeEvent = Event | diff --git a/src/renderers/shared/stack/reconciler/ReactInstanceType.js b/src/renderers/shared/stack/reconciler/ReactInstanceType.js index 0336467cb9..db04b3529f 100644 --- a/src/renderers/shared/stack/reconciler/ReactInstanceType.js +++ b/src/renderers/shared/stack/reconciler/ReactInstanceType.js @@ -30,6 +30,9 @@ export type ReactInstance = { getPublicInstance: any, _rootNodeID: number, + // ReactDOMComponent + _tag: string, + // instantiateReactComponent _mountIndex: number, _mountImage: any,