Home / Function/ getTypeOrNull() — react Function Reference

getTypeOrNull() — react Function Reference

Architecture documentation for the getTypeOrNull() function in Types.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  0c14d2e3_45c6_0de6_ab48_697f22ac7b93["getTypeOrNull()"]
  62703e39_4962_1fce_0d63_004c5aacd635["FlowTypeEnv"]
  0c14d2e3_45c6_0de6_ab48_697f22ac7b93 -->|defined in| 62703e39_4962_1fce_0d63_004c5aacd635
  ea542458_3f6c_6a0c_6d3b_af172f10f9a8["getType()"]
  ea542458_3f6c_6a0c_6d3b_af172f10f9a8 -->|calls| 0c14d2e3_45c6_0de6_ab48_697f22ac7b93
  d8dd1b5e_3796_9a03_a97b_b42a7fad07d5["serializeLoc()"]
  0c14d2e3_45c6_0de6_ab48_697f22ac7b93 -->|calls| d8dd1b5e_3796_9a03_a97b_b42a7fad07d5
  style 0c14d2e3_45c6_0de6_ab48_697f22ac7b93 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/Flood/Types.ts lines 749–756

  getTypeOrNull(identifier: Identifier): ResolvedType | null {
    const result = this.#types.get(identifier.id) ?? null;
    if (result == null && typeof identifier.loc !== 'symbol') {
      const flowType = this.#flowTypes.get(serializeLoc(identifier.loc));
      return flowType ?? null;
    }
    return result;
  }

Domain

Subdomains

Called By

Frequently Asked Questions

What does getTypeOrNull() do?
getTypeOrNull() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Flood/Types.ts.
Where is getTypeOrNull() defined?
getTypeOrNull() is defined in compiler/packages/babel-plugin-react-compiler/src/Flood/Types.ts at line 749.
What does getTypeOrNull() call?
getTypeOrNull() calls 1 function(s): serializeLoc.
What calls getTypeOrNull()?
getTypeOrNull() is called by 1 function(s): getType.

Analyze Your Own Codebase

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

Try Supermodel Free