Home / Type/ CollectHoistablePropertyLoadsContext Type — react Architecture

CollectHoistablePropertyLoadsContext Type — react Architecture

Architecture documentation for the CollectHoistablePropertyLoadsContext type/interface in CollectHoistablePropertyLoads.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  d4188952_b17e_a779_ba9c_18fae79a24fc["CollectHoistablePropertyLoadsContext"]
  53e05ed1_ffb1_8db2_8573_ef5a3fb99c72["CollectHoistablePropertyLoads.ts"]
  d4188952_b17e_a779_ba9c_18fae79a24fc -->|defined in| 53e05ed1_ffb1_8db2_8573_ef5a3fb99c72
  style d4188952_b17e_a779_ba9c_18fae79a24fc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/CollectHoistablePropertyLoads.ts lines 159–176

type CollectHoistablePropertyLoadsContext = {
  temporaries: ReadonlyMap<IdentifierId, ReactiveScopeDependency>;
  knownImmutableIdentifiers: ReadonlySet<IdentifierId>;
  hoistableFromOptionals: ReadonlyMap<BlockId, ReactiveScopeDependency>;
  registry: PropertyPathRegistry;
  /**
   * (For nested / inner function declarations)
   * Context variables (i.e. captured from an outer scope) that are immutable.
   * Note that this technically could be merged into `knownImmutableIdentifiers`,
   * but are currently kept separate for readability.
   */
  nestedFnImmutableContext: ReadonlySet<IdentifierId> | null;
  /**
   * Functions which are assumed to be eventually called (as opposed to ones which might
   * not be called, e.g. the 0th argument of Array.map)
   */
  assumedInvokedFns: ReadonlySet<LoweredFunction>;
};

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free