Home / Type/ OptionalTerminal Type — react Architecture

OptionalTerminal Type — react Architecture

Architecture documentation for the OptionalTerminal type/interface in HIR.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  91f8e009_4364_88cc_9e44_22f4899bc5b1["OptionalTerminal"]
  a451512c_09d1_62a9_9849_56979af31473["HIR.ts"]
  91f8e009_4364_88cc_9e44_22f4899bc5b1 -->|defined in| a451512c_09d1_62a9_9849_56979af31473
  style 91f8e009_4364_88cc_9e44_22f4899bc5b1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts lines 578–591

export type OptionalTerminal = {
  kind: 'optional';
  /*
   * Specifies whether this node was optional. If false, it means that the original
   * node was part of an optional chain but this specific item was non-optional.
   * For example, in `a?.b.c?.()`, the `.b` access is non-optional but appears within
   * an optional chain.
   */
  optional: boolean;
  test: BlockId;
  fallthrough: BlockId;
  id: InstructionId;
  loc: SourceLocation;
};

Frequently Asked Questions

What is the OptionalTerminal type?
OptionalTerminal is a type/interface in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts.
Where is OptionalTerminal defined?
OptionalTerminal is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts at line 578.

Analyze Your Own Codebase

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

Try Supermodel Free