Home / Function/ hasOwnDeclaration() — react Function Reference

hasOwnDeclaration() — react Function Reference

Architecture documentation for the hasOwnDeclaration() function in PruneUnusedScopes.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  63729a7b_662e_cdeb_1679_8ae36c41d27f["hasOwnDeclaration()"]
  c273bd3a_951b_cab6_1196_8484358b901c["PruneUnusedScopes.ts"]
  63729a7b_662e_cdeb_1679_8ae36c41d27f -->|defined in| c273bd3a_951b_cab6_1196_8484358b901c
  4f7ad929_f19e_7d55_33f1_e3306e7e41bc["transformScope()"]
  4f7ad929_f19e_7d55_33f1_e3306e7e41bc -->|calls| 63729a7b_662e_cdeb_1679_8ae36c41d27f
  style 63729a7b_662e_cdeb_1679_8ae36c41d27f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PruneUnusedScopes.ts lines 72–79

function hasOwnDeclaration(block: ReactiveScopeBlock): boolean {
  for (const declaration of block.scope.declarations.values()) {
    if (declaration.scope.id === block.scope.id) {
      return true;
    }
  }
  return false;
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does hasOwnDeclaration() do?
hasOwnDeclaration() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PruneUnusedScopes.ts.
Where is hasOwnDeclaration() defined?
hasOwnDeclaration() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PruneUnusedScopes.ts at line 72.
What calls hasOwnDeclaration()?
hasOwnDeclaration() is called by 1 function(s): transformScope.

Analyze Your Own Codebase

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

Try Supermodel Free