types.js — react Source File
Architecture documentation for types.js, a javascript file in the react codebase. 3 imports, 5 dependents.
Entity Profile
Dependency Diagram
graph LR 501f1668_e338_41a4_686c_5b2aee4863b8["types.js"] bcb71f5e_1ecf_5620_9a9e_55d6ab61dd1f["constants.js"] 501f1668_e338_41a4_686c_5b2aee4863b8 --> bcb71f5e_1ecf_5620_9a9e_55d6ab61dd1f 114016f3_a8fe_e14f_8022_69bffc846065["hydration"] 501f1668_e338_41a4_686c_5b2aee4863b8 --> 114016f3_a8fe_e14f_8022_69bffc846065 d8f20c67_f5fa_0f0a_c967_c41fd9ffce07["ReactTypes"] 501f1668_e338_41a4_686c_5b2aee4863b8 --> d8f20c67_f5fa_0f0a_c967_c41fd9ffce07 90c55265_8c71_a702_1208_8bdd01b6c4ae["bridge.js"] 90c55265_8c71_a702_1208_8bdd01b6c4ae --> 501f1668_e338_41a4_686c_5b2aee4863b8 bba85af0_a356_d0c5_4d12_914508b89593["store.js"] bba85af0_a356_d0c5_4d12_914508b89593 --> 501f1668_e338_41a4_686c_5b2aee4863b8 d6e62301_2363_364e_b031_c314353bac29["Updaters.js"] d6e62301_2363_364e_b031_c314353bac29 --> 501f1668_e338_41a4_686c_5b2aee4863b8 a49c4f66_71d5_8a62_f0a1_ffd7ca7bd5b2["hook.js"] a49c4f66_71d5_8a62_f0a1_ffd7ca7bd5b2 --> 501f1668_e338_41a4_686c_5b2aee4863b8 0de29888_ca49_eb3c_33f7_ab4fff46de0b["utils.js"] 0de29888_ca49_eb3c_33f7_ab4fff46de0b --> 501f1668_e338_41a4_686c_5b2aee4863b8 style 501f1668_e338_41a4_686c_5b2aee4863b8 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
*/
/**
* WARNING:
* This file contains types that are designed for React DevTools UI and how it interacts with the backend.
* They might be used in different versions of DevTools backends.
* Be mindful of backwards compatibility when making changes.
*/
import type {
Dehydrated,
Unserializable,
} from 'react-devtools-shared/src/hydration';
import type {ReactFunctionLocation, ReactStackTrace} from 'shared/ReactTypes';
import type {UnknownSuspendersReason} from '../constants';
export type BrowserTheme = 'dark' | 'light';
export type Wall = {
// `listen` returns the "unlisten" function.
listen: (fn: Function) => Function,
send: (event: string, payload: any, transferable?: Array<any>) => void,
};
// WARNING
// The values below are referenced by ComponentFilters (which are saved via localStorage).
// Do not change them or it will break previously saved user customizations.
// If new element types are added, use new numbers rather than re-ordering existing ones.
//
// Changing these types is also a backwards breaking change for the standalone shell,
// since the frontend and backend must share the same values-
// and the backend is embedded in certain environments (like React Native).
export const ElementTypeClass = 1;
export const ElementTypeContext = 2;
export const ElementTypeFunction = 5;
export const ElementTypeForwardRef = 6;
export const ElementTypeHostComponent = 7;
export const ElementTypeMemo = 8;
export const ElementTypeOtherOrUnknown = 9;
export const ElementTypeProfiler = 10;
export const ElementTypeRoot = 11;
export const ElementTypeSuspense = 12;
export const ElementTypeSuspenseList = 13;
export const ElementTypeTracingMarker = 14;
export const ElementTypeVirtual = 15;
export const ElementTypeViewTransition = 16;
export const ElementTypeActivity = 17;
// Different types of elements displayed in the Elements tree.
// These types may be used to visually distinguish types,
// or to enable/disable certain functionality.
export type ElementType =
| 1
// ... (297 more lines)
Domain
Subdomains
Functions
Dependencies
- ReactTypes
- constants.js
- hydration
Imported By
Source
Frequently Asked Questions
What does types.js do?
types.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 types.js?
types.js defines 1 function(s): export.listen.
What does types.js depend on?
types.js imports 3 module(s): ReactTypes, constants.js, hydration.
What files import types.js?
types.js is imported by 5 file(s): Updaters.js, bridge.js, hook.js, store.js, utils.js.
Where is types.js in the architecture?
types.js is located at packages/react-devtools-shared/src/frontend/types.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-shared/src/frontend).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free