Home / Function/ printType() — react Function Reference

printType() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  38999144_d544_edc0_6efe_18d9bf834ada["printType()"]
  912702ee_f06e_77d9_d237_a41c50607cdf["Types.ts"]
  38999144_d544_edc0_6efe_18d9bf834ada -->|defined in| 912702ee_f06e_77d9_d237_a41c50607cdf
  5b033808_ef9f_1c72_998b_14de0ddb4423["substitute()"]
  5b033808_ef9f_1c72_998b_14de0ddb4423 -->|calls| 38999144_d544_edc0_6efe_18d9bf834ada
  c0b647d9_982f_2dc6_de63_c350aa5665d4["printConcrete()"]
  c0b647d9_982f_2dc6_de63_c350aa5665d4 -->|calls| 38999144_d544_edc0_6efe_18d9bf834ada
  c0b647d9_982f_2dc6_de63_c350aa5665d4["printConcrete()"]
  38999144_d544_edc0_6efe_18d9bf834ada -->|calls| c0b647d9_982f_2dc6_de63_c350aa5665d4
  d7fde76c_4fd9_feb3_299b_798689f05bc6["assertExhaustive()"]
  38999144_d544_edc0_6efe_18d9bf834ada -->|calls| d7fde76c_4fd9_feb3_299b_798689f05bc6
  style 38999144_d544_edc0_6efe_18d9bf834ada fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/Flood/Types.ts lines 262–271

export function printType(type: Type): string {
  switch (type.kind) {
    case 'Concrete':
      return printConcrete(type.type, printType);
    case 'Variable':
      return `$${type.id}`;
    default:
      assertExhaustive(type, `Unknown type: ${JSON.stringify(type)}`);
  }
}

Domain

Subdomains

Frequently Asked Questions

What does printType() do?
printType() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Flood/Types.ts.
Where is printType() defined?
printType() is defined in compiler/packages/babel-plugin-react-compiler/src/Flood/Types.ts at line 262.
What does printType() call?
printType() calls 2 function(s): assertExhaustive, printConcrete.
What calls printType()?
printType() is called by 2 function(s): printConcrete, substitute.

Analyze Your Own Codebase

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

Try Supermodel Free