Home / File/ types.js — react Source File

types.js — react Source File

Architecture documentation for types.js, a javascript file in the react codebase. 9 imports, 15 dependents.

File javascript BabelCompiler Validation 9 imports 15 dependents 26 functions

Entity Profile

Dependency Diagram

graph LR
  0304bbc8_f110_6643_71c6_d26bddc58fde["types.js"]
  e3778820_57ff_7221_e2fb_64072d11afcc["agent.js"]
  0304bbc8_f110_6643_71c6_d26bddc58fde --> e3778820_57ff_7221_e2fb_64072d11afcc
  bcb71f5e_1ecf_5620_9a9e_55d6ab61dd1f["constants.js"]
  0304bbc8_f110_6643_71c6_d26bddc58fde --> bcb71f5e_1ecf_5620_9a9e_55d6ab61dd1f
  d8f20c67_f5fa_0f0a_c967_c41fd9ffce07["ReactTypes"]
  0304bbc8_f110_6643_71c6_d26bddc58fde --> d8f20c67_f5fa_0f0a_c967_c41fd9ffce07
  42892443_e223_3da0_aeb9_e1b32a408fb0["ReactInternalTypes"]
  0304bbc8_f110_6643_71c6_d26bddc58fde --> 42892443_e223_3da0_aeb9_e1b32a408fb0
  aec7978f_0a19_ba93_de9e_ac8cf5ddc74b["types"]
  0304bbc8_f110_6643_71c6_d26bddc58fde --> aec7978f_0a19_ba93_de9e_ac8cf5ddc74b
  a0f3dac9_e573_4923_3098_4bb9e10f0e2d["setupNativeStyleEditor"]
  0304bbc8_f110_6643_71c6_d26bddc58fde --> a0f3dac9_e573_4923_3098_4bb9e10f0e2d
  bb23732c_ecb9_fba3_cd32_68ff2320751d["backend"]
  0304bbc8_f110_6643_71c6_d26bddc58fde --> bb23732c_ecb9_fba3_cd32_68ff2320751d
  68abd97e_17ac_d8a8_2d83_de72fc71c4a8["types"]
  0304bbc8_f110_6643_71c6_d26bddc58fde --> 68abd97e_17ac_d8a8_2d83_de72fc71c4a8
  4077b620_5c59_61c2_0910_273f565da757["bridge"]
  0304bbc8_f110_6643_71c6_d26bddc58fde --> 4077b620_5c59_61c2_0910_273f565da757
  000d0fc2_7992_5e09_af69_667403fcc410["setupNativeStyleEditor.js"]
  000d0fc2_7992_5e09_af69_667403fcc410 --> 0304bbc8_f110_6643_71c6_d26bddc58fde
  e3778820_57ff_7221_e2fb_64072d11afcc["agent.js"]
  e3778820_57ff_7221_e2fb_64072d11afcc --> 0304bbc8_f110_6643_71c6_d26bddc58fde
  2bbfa631_5780_6883_1746_b7c42df10b5d["DevToolsFiberComponentStack.js"]
  2bbfa631_5780_6883_1746_b7c42df10b5d --> 0304bbc8_f110_6643_71c6_d26bddc58fde
  7dc1582f_e5c4_6fb0_e998_bd2982c8c801["renderer.js"]
  7dc1582f_e5c4_6fb0_e998_bd2982c8c801 --> 0304bbc8_f110_6643_71c6_d26bddc58fde
  50ab7512_20ae_29b1_e876_3d07fe8f521c["renderer.js"]
  50ab7512_20ae_29b1_e876_3d07fe8f521c --> 0304bbc8_f110_6643_71c6_d26bddc58fde
  7fba5194_4415_41ad_1366_ead346337fb8["index.js"]
  7fba5194_4415_41ad_1366_ead346337fb8 --> 0304bbc8_f110_6643_71c6_d26bddc58fde
  style 0304bbc8_f110_6643_71c6_d26bddc58fde 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 conceptually related to React internals and
 * DevTools backends, but can be passed to frontend via the bridge.
 * Be mindful of backwards compatibility when making changes.
 */

import type {
  ReactContext,
  Wakeable,
  ReactComponentInfo,
} from 'shared/ReactTypes';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {
  ComponentFilter,
  ElementType,
  Plugins,
} from 'react-devtools-shared/src/frontend/types';
import type {
  ResolveNativeStyle,
  SetupNativeStyleEditor,
} from 'react-devtools-shared/src/backend/NativeStyleEditor/setupNativeStyleEditor';
import type {InitBackend} from 'react-devtools-shared/src/backend';
import type {TimelineDataExport} from 'react-devtools-timeline/src/types';
import type {BackendBridge} from 'react-devtools-shared/src/bridge';
import type {ReactFunctionLocation, ReactStackTrace} from 'shared/ReactTypes';
import type Agent from './agent';
import type {UnknownSuspendersReason} from '../constants';

type BundleType =
  | 0 // PROD
  | 1; // DEV

export type WorkTag = number;
export type WorkFlags = number;
export type ExpirationTime = number;

export type WorkTagMap = {
  CacheComponent: WorkTag,
  ClassComponent: WorkTag,
  ContextConsumer: WorkTag,
  ContextProvider: WorkTag,
  CoroutineComponent: WorkTag,
  CoroutineHandlerPhase: WorkTag,
  DehydratedSuspenseComponent: WorkTag,
  ForwardRef: WorkTag,
  Fragment: WorkTag,
  FunctionComponent: WorkTag,
  HostComponent: WorkTag,
  HostPortal: WorkTag,
  HostRoot: WorkTag,
// ... (546 more lines)

Domain

Subdomains

Dependencies

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 26 function(s): FindHostInstancesForElementID, FindLastKnownRectsForID, GetDisplayNameForElementID, GetElementIDForHostInstance, ReactRenderer.findFiberByHostInstance, RendererInterface.checkDCE, RendererInterface.cleanup, RendererInterface.clearErrorsAndWarnings, RendererInterface.clearErrorsForElementID, RendererInterface.clearWarningsForElementID, and 16 more.
What does types.js depend on?
types.js imports 9 module(s): ReactInternalTypes, ReactTypes, agent.js, backend, bridge, constants.js, setupNativeStyleEditor, types, and 1 more.
What files import types.js?
types.js is imported by 15 file(s): DevToolsComponentStackFrame.js, DevToolsFiberComponentStack.js, Highlighter.js, SettingsModalContext.js, agent.js, canvas.js, hook.js, index.js, and 7 more.
Where is types.js in the architecture?
types.js is located at packages/react-devtools-shared/src/backend/types.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-shared/src/backend).

Analyze Your Own Codebase

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

Try Supermodel Free