Home / File/ TopLevelEventTypes.js — react Source File

TopLevelEventTypes.js — react Source File

Architecture documentation for TopLevelEventTypes.js, a javascript file in the react codebase. 0 imports, 6 dependents.

File javascript BabelCompiler Validation 6 dependents 2 functions

Entity Profile

Dependency Diagram

graph LR
  304edd67_bb4f_7b82_bbee_3b770742ef97["TopLevelEventTypes.js"]
  846f0667_39ae_eb6e_55fe_26d3acf81e44["ReactFabricEventEmitter.js"]
  846f0667_39ae_eb6e_55fe_26d3acf81e44 --> 304edd67_bb4f_7b82_bbee_3b770742ef97
  577670f6_1f7f_5e0d_b9b6_894b69a76a73["ReactNativeBridgeEventPlugin.js"]
  577670f6_1f7f_5e0d_b9b6_894b69a76a73 --> 304edd67_bb4f_7b82_bbee_3b770742ef97
  baab5855_112a_37e6_6ca7_0813fd6ae027["ReactNativeEventEmitter.js"]
  baab5855_112a_37e6_6ca7_0813fd6ae027 --> 304edd67_bb4f_7b82_bbee_3b770742ef97
  6b52f26d_d341_6500_ecb0_54a0747596f4["EventPluginRegistry.js"]
  6b52f26d_d341_6500_ecb0_54a0747596f4 --> 304edd67_bb4f_7b82_bbee_3b770742ef97
  e7f91ff9_eaf6_39c4_5463_6f4e0e1c075f["PluginModuleType.js"]
  e7f91ff9_eaf6_39c4_5463_6f4e0e1c075f --> 304edd67_bb4f_7b82_bbee_3b770742ef97
  b2f450b6_f67a_153d_5efb_a03735431450["ReactSyntheticEventType.js"]
  b2f450b6_f67a_153d_5efb_a03735431450 --> 304edd67_bb4f_7b82_bbee_3b770742ef97
  style 304edd67_bb4f_7b82_bbee_3b770742ef97 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 */

export type RNTopLevelEventType =
  | 'topMouseDown'
  | 'topMouseMove'
  | 'topMouseUp'
  | 'topScroll'
  | 'topSelectionChange'
  | 'topTouchCancel'
  | 'topTouchEnd'
  | 'topTouchMove'
  | 'topTouchStart';

export opaque type DOMTopLevelEventType = string;

// Do not use the below two methods directly!
// Instead use constants exported from DOMTopLevelEventTypes in ReactDOM.
// (It is the only module that is allowed to access these methods.)

export function unsafeCastStringToDOMTopLevelType(
  topLevelType: string,
): DOMTopLevelEventType {
  return topLevelType;
}

export function unsafeCastDOMTopLevelTypeToString(
  topLevelType: DOMTopLevelEventType,
): string {
  return topLevelType;
}

export type TopLevelType = DOMTopLevelEventType | RNTopLevelEventType;

Domain

Subdomains

Frequently Asked Questions

What does TopLevelEventTypes.js do?
TopLevelEventTypes.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in TopLevelEventTypes.js?
TopLevelEventTypes.js defines 2 function(s): unsafeCastDOMTopLevelTypeToString, unsafeCastStringToDOMTopLevelType.
What files import TopLevelEventTypes.js?
TopLevelEventTypes.js is imported by 6 file(s): EventPluginRegistry.js, PluginModuleType.js, ReactFabricEventEmitter.js, ReactNativeBridgeEventPlugin.js, ReactNativeEventEmitter.js, ReactSyntheticEventType.js.
Where is TopLevelEventTypes.js in the architecture?
TopLevelEventTypes.js is located at packages/react-native-renderer/src/legacy-events/TopLevelEventTypes.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-native-renderer/src/legacy-events).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free