Home / Function/ validateMutableRange() — react Function Reference

validateMutableRange() — react Function Reference

Architecture documentation for the validateMutableRange() function in AssertValidMutableRanges.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  a02e9d60_7c48_c520_e285_86687853f862["validateMutableRange()"]
  f9422309_9e6e_f2fd_460b_718008fd5ae7["AssertValidMutableRanges.ts"]
  a02e9d60_7c48_c520_e285_86687853f862 -->|defined in| f9422309_9e6e_f2fd_460b_718008fd5ae7
  71ad5730_9f0f_f255_1885_256493612553["visit()"]
  71ad5730_9f0f_f255_1885_256493612553 -->|calls| a02e9d60_7c48_c520_e285_86687853f862
  bf7f1cf7_fc0e_6bac_827c_8d36d98126da["printPlace()"]
  a02e9d60_7c48_c520_e285_86687853f862 -->|calls| bf7f1cf7_fc0e_6bac_827c_8d36d98126da
  style a02e9d60_7c48_c520_e285_86687853f862 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/AssertValidMutableRanges.ts lines 50–63

function validateMutableRange(
  place: Place,
  range: MutableRange,
  description: string,
): void {
  CompilerError.invariant(
    (range.start === 0 && range.end === 0) || range.end > range.start,
    {
      reason: `Invalid mutable range: [${range.start}:${range.end}]`,
      description: `${printPlace(place)} in ${description}`,
      loc: place.loc,
    },
  );
}

Subdomains

Calls

Called By

Frequently Asked Questions

What does validateMutableRange() do?
validateMutableRange() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/AssertValidMutableRanges.ts.
Where is validateMutableRange() defined?
validateMutableRange() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/AssertValidMutableRanges.ts at line 50.
What does validateMutableRange() call?
validateMutableRange() calls 1 function(s): printPlace.
What calls validateMutableRange()?
validateMutableRange() is called by 1 function(s): visit.

Analyze Your Own Codebase

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

Try Supermodel Free