mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
* Add TopLevelEventTypes * Fix `ReactBrowserEventEmitter` * Fix EventPluginUtils * Fix TapEventPlugin * Fix ResponderEventPlugin * Update ReactDOMFiberComponent * Fix BeforeInputEventPlugin * Fix ChangeEventPlugin * Fix EnterLeaveEventPlugin * Add missing non top event type used in ChangeEventPlugin * Fix SelectEventPlugin * Fix SimpleEventPlugin * Fix outstanding Flow issues and move TopLevelEventTypes * Inline a list of all events in `ReactTestUtils` * Fix tests * Make it pretty * Fix completly unrelated typo * Don’t use map constructor because of IE11 * Update typings, revert changes to native code * Make topLevelTypes in ResponderEventPlugin injectable and create DOM and ReactNative variant * Set proper dependencies for DOMResponderEventPlugin * Prettify * Make some react dom tests no longer depend on internal API * Use factories to create top level speific generic event modules * Remove unused dependency * Revert exposed module renaming, hide store creation, and inline dependency decleration * Add Flow types to createResponderEventPlugin and its consumers * Remove unused dependency * Use opaque flow type for TopLevelType * Add missing semis * Use raw event names as top level identifer * Upgrade baylon This is required for parsing opaque flow types in our CI tests. * Clean up flow types * Revert Map changes of ReactBrowserEventEmitter * Upgrade babel-* packages Apparently local unit tests also have issues with parsing JavaScript modules that contain opaque types (not sure why I didn't notice earlier!?). * Revert Map changes of SimpleEventPlugin * Clean up ReactTestUtils * Add missing semi * Fix Flow issue * Make TopLevelType clearer * Favor for loops * Explain the new DOMTopLevelEventTypes concept * Use static injection for Responder plugin types * Remove null check and rely on flow checks * Add missing ResponderEventPlugin dependencies
34 lines
876 B
JavaScript
34 lines
876 B
JavaScript
/**
|
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* Flow type for SyntheticEvent class that includes private properties
|
|
* @flow
|
|
*/
|
|
|
|
import type {Fiber} from 'react-reconciler/src/ReactFiber';
|
|
import type {TopLevelType} from './TopLevelEventTypes';
|
|
|
|
export type DispatchConfig = {
|
|
dependencies: Array<TopLevelType>,
|
|
phasedRegistrationNames?: {
|
|
bubbled: string,
|
|
captured: string,
|
|
},
|
|
registrationName?: string,
|
|
isInteractive?: boolean,
|
|
};
|
|
|
|
export type ReactSyntheticEvent = {
|
|
dispatchConfig: DispatchConfig,
|
|
getPooled: (
|
|
dispatchConfig: DispatchConfig,
|
|
targetInst: Fiber,
|
|
nativeTarget: Event,
|
|
nativeEventTarget: EventTarget,
|
|
) => ReactSyntheticEvent,
|
|
isPersistent: () => boolean,
|
|
} & SyntheticEvent<>;
|