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 type for SyntheticEvent class that includes private properties
    
  8.  * @flow
    
  9.  */
    
  10. 
    
  11. import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
    
  12. import type {TopLevelType} from './TopLevelEventTypes';
    
  13. 
    
  14. export type DispatchConfig = {
    
  15.   dependencies?: Array<TopLevelType>,
    
  16.   phasedRegistrationNames: {
    
  17.     bubbled: null | string,
    
  18.     captured: null | string,
    
  19.     skipBubbling?: ?boolean,
    
  20.   },
    
  21.   registrationName?: string,
    
  22. };
    
  23. 
    
  24. export type CustomDispatchConfig = {
    
  25.   phasedRegistrationNames: {
    
  26.     bubbled: null,
    
  27.     captured: null,
    
  28.     skipBubbling?: ?boolean,
    
  29.   },
    
  30.   registrationName?: string,
    
  31.   customEvent: true,
    
  32. };
    
  33. 
    
  34. export type ReactSyntheticEvent = {
    
  35.   dispatchConfig: DispatchConfig | CustomDispatchConfig,
    
  36.   getPooled: (
    
  37.     dispatchConfig: DispatchConfig | CustomDispatchConfig,
    
  38.     targetInst: Fiber,
    
  39.     nativeTarget: Event,
    
  40.     nativeEventTarget: EventTarget,
    
  41.   ) => ReactSyntheticEvent,
    
  42.   isPersistent: () => boolean,
    
  43.   isPropagationStopped: () => boolean,
    
  44.   _dispatchInstances?: null | Array<Fiber | null> | Fiber,
    
  45.   _dispatchListeners?: null | Array<Function> | Function,
    
  46.   _targetInst: Fiber,
    
  47.   type: string,
    
  48.   currentTarget: null | EventTarget,
    
  49. };