1. /**
    
  2.  * Copyright (c) Meta Platforms, Inc. and affiliates.
    
  3.  *
    
  4.  * This source code is licensed under the MIT license found in the
    
  5.  * LICENSE file in the root directory of this source tree.
    
  6.  *
    
  7.  * @flow
    
  8.  */
    
  9. 
    
  10. import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
    
  11. import type {
    
  12.   DispatchConfig,
    
  13.   ReactSyntheticEvent,
    
  14. } from './ReactSyntheticEventType';
    
  15. import type {TopLevelType} from './TopLevelEventTypes';
    
  16. 
    
  17. export type EventTypes = {[key: string]: DispatchConfig};
    
  18. 
    
  19. export type AnyNativeEvent = Event | KeyboardEvent | MouseEvent | TouchEvent;
    
  20. 
    
  21. export type PluginName = string;
    
  22. 
    
  23. export type EventSystemFlags = number;
    
  24. 
    
  25. export type LegacyPluginModule<NativeEvent> = {
    
  26.   eventTypes: EventTypes,
    
  27.   extractEvents: (
    
  28.     topLevelType: TopLevelType,
    
  29.     targetInst: null | Fiber,
    
  30.     nativeTarget: NativeEvent,
    
  31.     nativeEventTarget: null | EventTarget,
    
  32.     eventSystemFlags?: number,
    
  33.     container?: null | EventTarget,
    
  34.   ) => ?ReactSyntheticEvent,
    
  35.   tapMoveThreshold?: number,
    
  36. };