Home / File/ index.ts — react Source File

index.ts — react Source File

Architecture documentation for index.ts, a typescript file in the react codebase. 15 imports, 0 dependents.

File typescript BabelCompiler Validation 15 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  45729896_cc85_f8cb_a3e3_efc08e3b01a6["index.ts"]
  4a067d5c_bbcb_c424_2a8c_331d08f994f4["index.ts"]
  45729896_cc85_f8cb_a3e3_efc08e3b01a6 --> 4a067d5c_bbcb_c424_2a8c_331d08f994f4
  7de81da8_4c64_d7e3_9e79_4b022a251d41["compile"]
  45729896_cc85_f8cb_a3e3_efc08e3b01a6 --> 7de81da8_4c64_d7e3_9e79_4b022a251d41
  ec0eb7b0_81a8_ca23_bcdc_96f2fc710cb4["compat.ts"]
  45729896_cc85_f8cb_a3e3_efc08e3b01a6 --> ec0eb7b0_81a8_ca23_bcdc_96f2fc710cb4
  a17d2c19_fa81_ce18_3875_68a5340b975e["babelLocationToRange"]
  45729896_cc85_f8cb_a3e3_efc08e3b01a6 --> a17d2c19_fa81_ce18_3875_68a5340b975e
  4e75e3e7_7c36_5cd0_d1f0_f3f02d3d58b4["getRangeFirstCharacter"]
  45729896_cc85_f8cb_a3e3_efc08e3b01a6 --> 4e75e3e7_7c36_5cd0_d1f0_f3f02d3d58b4
  08a4e47f_6b9c_64f7_9030_8560a35663d9["autodepsdecorations.ts"]
  45729896_cc85_f8cb_a3e3_efc08e3b01a6 --> 08a4e47f_6b9c_64f7_9030_8560a35663d9
  c22d5a3d_3487_16b9_1aaa_bcb46a8280f5["mapCompilerEventToLSPEvent"]
  45729896_cc85_f8cb_a3e3_efc08e3b01a6 --> c22d5a3d_3487_16b9_1aaa_bcb46a8280f5
  8e72bb38_0446_40c5_e453_1f12111e8936["range.ts"]
  45729896_cc85_f8cb_a3e3_efc08e3b01a6 --> 8e72bb38_0446_40c5_e453_1f12111e8936
  35c613c8_6942_3a0e_e94b_31a0285f447a["isPositionWithinRange"]
  45729896_cc85_f8cb_a3e3_efc08e3b01a6 --> 35c613c8_6942_3a0e_e94b_31a0285f447a
  40fcb906_1b06_4227_f71a_10e07138aa5a["isRangeWithinRange"]
  45729896_cc85_f8cb_a3e3_efc08e3b01a6 --> 40fcb906_1b06_4227_f71a_10e07138aa5a
  d5f52879_8444_12a7_6731_1f8516bf5b33["Range"]
  45729896_cc85_f8cb_a3e3_efc08e3b01a6 --> d5f52879_8444_12a7_6731_1f8516bf5b33
  497f93b4_2542_8bd2_bd98_b0f4095478c3["sourceLocationToRange"]
  45729896_cc85_f8cb_a3e3_efc08e3b01a6 --> 497f93b4_2542_8bd2_bd98_b0f4095478c3
  d0e453f3_05cd_2acf_706a_db3a9a8be9a9["vscode-languageserver-textdocument"]
  45729896_cc85_f8cb_a3e3_efc08e3b01a6 --> d0e453f3_05cd_2acf_706a_db3a9a8be9a9
  68521835_0a40_a94c_8edf_d1628eba6b29["node"]
  45729896_cc85_f8cb_a3e3_efc08e3b01a6 --> 68521835_0a40_a94c_8edf_d1628eba6b29
  style 45729896_cc85_f8cb_a3e3_efc08e3b01a6 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.
 */

import {TextDocument} from 'vscode-languageserver-textdocument';
import {
  CodeAction,
  CodeActionKind,
  CodeLens,
  Command,
  createConnection,
  type InitializeParams,
  type InitializeResult,
  Position,
  ProposedFeatures,
  TextDocuments,
  TextDocumentSyncKind,
} from 'vscode-languageserver/node';
import {compile, lastResult} from './compiler';
import {
  type CompileSuccessEvent,
  type LoggerEvent,
  type PluginOptions,
  defaultOptions,
} from 'babel-plugin-react-compiler';
import {babelLocationToRange, getRangeFirstCharacter} from './compiler/compat';
import {
  type AutoDepsDecorationsLSPEvent,
  AutoDepsDecorationsRequest,
  mapCompilerEventToLSPEvent,
} from './requests/autodepsdecorations';
import {
  isPositionWithinRange,
  isRangeWithinRange,
  Range,
  sourceLocationToRange,
} from './utils/range';

const SUPPORTED_LANGUAGE_IDS = new Set([
  'javascript',
  'javascriptreact',
  'typescript',
  'typescriptreact',
]);

const connection = createConnection(ProposedFeatures.all);
const documents = new TextDocuments(TextDocument);

let compilerOptions: PluginOptions | null = null;
let compiledFns: Set<CompileSuccessEvent> = new Set();
let autoDepsDecorations: Array<AutoDepsDecorationsLSPEvent> = [];
let codeActionEvents: Array<CodeActionLSPEvent> = [];

type CodeActionLSPEvent = {
  title: string;
  kind: CodeActionKind;
  newText: string;
// ... (194 more lines)

Domain

Subdomains

Functions

Frequently Asked Questions

What does index.ts do?
index.ts is a source file in the react codebase, written in typescript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in index.ts?
index.ts defines 1 function(s): resetState.
What does index.ts depend on?
index.ts imports 15 module(s): Range, autodepsdecorations.ts, babel-plugin-react-compiler, babelLocationToRange, compat.ts, compile, getRangeFirstCharacter, index.ts, and 7 more.
Where is index.ts in the architecture?
index.ts is located at compiler/packages/react-forgive/server/src/index.ts (domain: BabelCompiler, subdomain: Validation, directory: compiler/packages/react-forgive/server/src).

Analyze Your Own Codebase

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

Try Supermodel Free