printType() — react Function Reference
Architecture documentation for the printType() function in PrintHIR.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 208a1c63_a0e4_6b94_9107_8eadcb1bdfcf["printType()"] 911671da_f209_22ee_2f71_4b0c94946a53["PrintHIR.ts"] 208a1c63_a0e4_6b94_9107_8eadcb1bdfcf -->|defined in| 911671da_f209_22ee_2f71_4b0c94946a53 6f30ff19_b54d_e580_1716_02c10cdb8a45["printPhi()"] 6f30ff19_b54d_e580_1716_02c10cdb8a45 -->|calls| 208a1c63_a0e4_6b94_9107_8eadcb1bdfcf 5e25fb16_62c0_8048_3232_fcda18979f6c["printInstructionValue()"] 5e25fb16_62c0_8048_3232_fcda18979f6c -->|calls| 208a1c63_a0e4_6b94_9107_8eadcb1bdfcf b8fc6a90_4e66_69af_f5d9_b6822409f09f["printPlace()"] b8fc6a90_4e66_69af_f5d9_b6822409f09f -->|calls| 208a1c63_a0e4_6b94_9107_8eadcb1bdfcf d3cbc175_3976_cf3c_5adb_57077d982bb1["printDependency()"] d3cbc175_3976_cf3c_5adb_57077d982bb1 -->|calls| 208a1c63_a0e4_6b94_9107_8eadcb1bdfcf style 208a1c63_a0e4_6b94_9107_8eadcb1bdfcf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/HIR/PrintHIR.ts lines 879–890
export function printType(type: Type): string {
if (type.kind === 'Type') return '';
// TODO(mofeiZ): add debugName for generated ids
if (type.kind === 'Object' && type.shapeId != null) {
return `:T${type.kind}<${type.shapeId}>`;
} else if (type.kind === 'Function' && type.shapeId != null) {
const returnType = printType(type.return);
return `:T${type.kind}<${type.shapeId}>()${returnType !== '' ? `: ${returnType}` : ''}`;
} else {
return `:T${type.kind}`;
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does printType() do?
printType() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/PrintHIR.ts.
Where is printType() defined?
printType() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/PrintHIR.ts at line 879.
What calls printType()?
printType() is called by 4 function(s): printDependency, printInstructionValue, printPhi, printPlace.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free