Home / File/ types.js — react Source File

types.js — react Source File

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

File javascript BabelCompiler Validation 2 imports 28 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  20cc2065_4b5b_fd6b_be12_28f36b0ff4cf["types.js"]
  d0e34df5_54e0_bd63_7394_3bfe61a4c376["scrollState.js"]
  20cc2065_4b5b_fd6b_be12_28f36b0ff4cf --> d0e34df5_54e0_bd63_7394_3bfe61a4c376
  24a36b11_d722_13bc_2618_326e21791b68["error-stack-parser"]
  20cc2065_4b5b_fd6b_be12_28f36b0ff4cf --> 24a36b11_d722_13bc_2618_326e21791b68
  d5e5a241_0d88_22ae_6561_9211ad78e796["CanvasPage.js"]
  d5e5a241_0d88_22ae_6561_9211ad78e796 --> 20cc2065_4b5b_fd6b_be12_28f36b0ff4cf
  e0a3b260_ea80_6b59_5c7d_18081c4333a6["CanvasPageContextMenu.js"]
  e0a3b260_ea80_6b59_5c7d_18081c4333a6 --> 20cc2065_4b5b_fd6b_be12_28f36b0ff4cf
  57dc23c0_c74d_e09e_ad1f_116cb590a38c["EventTooltip.js"]
  57dc23c0_c74d_e09e_ad1f_116cb590a38c --> 20cc2065_4b5b_fd6b_be12_28f36b0ff4cf
  7fd04d1f_8e14_be78_275b_49d4237a927b["Timeline.js"]
  7fd04d1f_8e14_be78_275b_49d4237a927b --> 20cc2065_4b5b_fd6b_be12_28f36b0ff4cf
  7b213c28_1e91_ab50_3fbc_02eaee967af5["TimelineContext.js"]
  7b213c28_1e91_ab50_3fbc_02eaee967af5 --> 20cc2065_4b5b_fd6b_be12_28f36b0ff4cf
  f222957d_5161_94da_3126_e94f7f8ded93["TimelineSearchContext.js"]
  f222957d_5161_94da_3126_e94f7f8ded93 --> 20cc2065_4b5b_fd6b_be12_28f36b0ff4cf
  264bd2ad_e2e5_86fa_8a9c_741f2a953c2f["ComponentMeasuresView.js"]
  264bd2ad_e2e5_86fa_8a9c_741f2a953c2f --> 20cc2065_4b5b_fd6b_be12_28f36b0ff4cf
  d08702f1_e022_2394_00ee_ac0a9c33e2de["FlamechartView.js"]
  d08702f1_e022_2394_00ee_ac0a9c33e2de --> 20cc2065_4b5b_fd6b_be12_28f36b0ff4cf
  259c9bd5_8e3e_fcc5_0448_afc1cd9d1e73["NativeEventsView.js"]
  259c9bd5_8e3e_fcc5_0448_afc1cd9d1e73 --> 20cc2065_4b5b_fd6b_be12_28f36b0ff4cf
  13604060_cb94_5e01_9368_0ead23d3891e["NetworkMeasuresView.js"]
  13604060_cb94_5e01_9368_0ead23d3891e --> 20cc2065_4b5b_fd6b_be12_28f36b0ff4cf
  7a7af6eb_0683_8d73_95cc_81cc7b37dc33["ReactMeasuresView.js"]
  7a7af6eb_0683_8d73_95cc_81cc7b37dc33 --> 20cc2065_4b5b_fd6b_be12_28f36b0ff4cf
  25e4583e_f456_f560_39a0_cd2c2a2ed857["SchedulingEventsView.js"]
  25e4583e_f456_f560_39a0_cd2c2a2ed857 --> 20cc2065_4b5b_fd6b_be12_28f36b0ff4cf
  style 20cc2065_4b5b_fd6b_be12_28f36b0ff4cf 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
 */
import type {StackFrame as ErrorStackFrame} from 'error-stack-parser';
import type {ScrollState} from './view-base/utils/scrollState';

// Source: https://github.com/facebook/flow/issues/4002#issuecomment-323612798
// eslint-disable-next-line no-unused-vars
type Return_<R, F: (...args: Array<any>) => R> = R;
/** Get return type of a function. */
export type Return<T> = Return_<mixed, T>;

// Project types
export type {ErrorStackFrame};

export type Milliseconds = number;

export type ReactLane = number;

export type NativeEvent = {
  +depth: number,
  +duration: Milliseconds,
  +timestamp: Milliseconds,
  +type: string,
  warning: string | null,
};

type BaseReactEvent = {
  +componentName?: string,
  +timestamp: Milliseconds,
  warning: string | null,
};

type BaseReactScheduleEvent = {
  ...BaseReactEvent,
  +lanes: ReactLane[],
};
export type ReactScheduleRenderEvent = {
  ...BaseReactScheduleEvent,
  +type: 'schedule-render',
};
export type ReactScheduleStateUpdateEvent = {
  ...BaseReactScheduleEvent,
  +componentStack?: string,
  +type: 'schedule-state-update',
};
export type ReactScheduleForceUpdateEvent = {
  ...BaseReactScheduleEvent,
  +type: 'schedule-force-update',
};

export type Phase = 'mount' | 'update';

export type SuspenseEvent = {
  ...BaseReactEvent,
// ... (190 more lines)

Domain

Subdomains

Dependencies

Imported By

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): HorizontalScrollStateChangeCallback.
What does types.js depend on?
types.js imports 2 module(s): error-stack-parser, scrollState.js.
What files import types.js?
types.js is imported by 28 file(s): CanvasPage.js, CanvasPageContextMenu.js, ComponentMeasuresView.js, EventTooltip.js, FlamechartView.js, HorizontalPanAndZoomView.js, NativeEventsView.js, NetworkMeasuresView.js, and 20 more.
Where is types.js in the architecture?
types.js is located at packages/react-devtools-timeline/src/types.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-timeline/src).

Analyze Your Own Codebase

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

Try Supermodel Free