Home / Function/ makeDeclarationId() — react Function Reference

makeDeclarationId() — react Function Reference

Architecture documentation for the makeDeclarationId() function in HIR.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  9994dc80_69bc_44aa_ef8c_97977d75801a["makeDeclarationId()"]
  18a78965_f593_105b_e5e8_07001321c2ec["HIR.ts"]
  9994dc80_69bc_44aa_ef8c_97977d75801a -->|defined in| 18a78965_f593_105b_e5e8_07001321c2ec
  4e7c3351_9e52_0196_d1f4_d8371b23d0cb["makeTemporaryIdentifier()"]
  4e7c3351_9e52_0196_d1f4_d8371b23d0cb -->|calls| 9994dc80_69bc_44aa_ef8c_97977d75801a
  cf4d0005_5527_42f1_2412_741dbace1899["resolveBinding()"]
  cf4d0005_5527_42f1_2412_741dbace1899 -->|calls| 9994dc80_69bc_44aa_ef8c_97977d75801a
  cf7ad9bc_bfc5_bfed_c15e_762d1f3aa262["signatureArgument()"]
  cf7ad9bc_bfc5_bfed_c15e_762d1f3aa262 -->|calls| 9994dc80_69bc_44aa_ef8c_97977d75801a
  041ca752_10c1_3cda_1f5c_02f44a01310e["invariant()"]
  9994dc80_69bc_44aa_ef8c_97977d75801a -->|calls| 041ca752_10c1_3cda_1f5c_02f44a01310e
  style 9994dc80_69bc_44aa_ef8c_97977d75801a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts lines 1760–1766

export function makeDeclarationId(id: number): DeclarationId {
  CompilerError.invariant(id >= 0 && Number.isInteger(id), {
    reason: 'Expected declaration id to be a non-negative integer',
    loc: GeneratedSource,
  });
  return id as DeclarationId;
}

Subdomains

Calls

Frequently Asked Questions

What does makeDeclarationId() do?
makeDeclarationId() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts.
Where is makeDeclarationId() defined?
makeDeclarationId() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts at line 1760.
What does makeDeclarationId() call?
makeDeclarationId() calls 1 function(s): invariant.
What calls makeDeclarationId()?
makeDeclarationId() is called by 3 function(s): makeTemporaryIdentifier, resolveBinding, signatureArgument.

Analyze Your Own Codebase

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

Try Supermodel Free