Types.ts — react Source File
Architecture documentation for Types.ts, a typescript file in the react codebase. 8 imports, 3 dependents.
Entity Profile
Dependency Diagram
graph LR 912702ee_f06e_77d9_d237_a41c50607cdf["Types.ts"] 0423f759_97e0_9101_4634_ed555abc5ca9["index.ts"] 912702ee_f06e_77d9_d237_a41c50607cdf --> 0423f759_97e0_9101_4634_ed555abc5ca9 8086dd94_cb7f_b871_d873_325159c25b69["TypeErrors.ts"] 912702ee_f06e_77d9_d237_a41c50607cdf --> 8086dd94_cb7f_b871_d873_325159c25b69 eb9d33f9_42c1_205c_93e6_8e1365a31839["utils.ts"] 912702ee_f06e_77d9_d237_a41c50607cdf --> eb9d33f9_42c1_205c_93e6_8e1365a31839 d7fde76c_4fd9_feb3_299b_798689f05bc6["assertExhaustive"] 912702ee_f06e_77d9_d237_a41c50607cdf --> d7fde76c_4fd9_feb3_299b_798689f05bc6 c5d180c1_c87f_31d8_abb1_5df55aa41d35["FlowTypes.ts"] 912702ee_f06e_77d9_d237_a41c50607cdf --> c5d180c1_c87f_31d8_abb1_5df55aa41d35 da9016ef_f4da_f92e_a151_ccfab021340c["FlowType"] 912702ee_f06e_77d9_d237_a41c50607cdf --> da9016ef_f4da_f92e_a151_ccfab021340c 2ed45bcd_6c82_3ccd_0e20_fa96b5111055[".."] 912702ee_f06e_77d9_d237_a41c50607cdf --> 2ed45bcd_6c82_3ccd_0e20_fa96b5111055 52e3d8d7_abf4_7343_1f98_3f701ec04082["types"] 912702ee_f06e_77d9_d237_a41c50607cdf --> 52e3d8d7_abf4_7343_1f98_3f701ec04082 8086dd94_cb7f_b871_d873_325159c25b69["TypeErrors.ts"] 8086dd94_cb7f_b871_d873_325159c25b69 --> 912702ee_f06e_77d9_d237_a41c50607cdf 1fccc28d_09ce_cbd9_cc1b_5224a1b90f93["TypeUtils.ts"] 1fccc28d_09ce_cbd9_cc1b_5224a1b90f93 --> 912702ee_f06e_77d9_d237_a41c50607cdf 1b971013_8a90_0d8d_1fcc_f31581cd66aa["Environment.ts"] 1b971013_8a90_0d8d_1fcc_f31581cd66aa --> 912702ee_f06e_77d9_d237_a41c50607cdf style 912702ee_f06e_77d9_d237_a41c50607cdf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import {CompilerError, SourceLocation} from '..';
import {
Environment,
GeneratedSource,
HIRFunction,
Identifier,
IdentifierId,
} from '../HIR';
import * as t from '@babel/types';
import * as TypeErrors from './TypeErrors';
import {assertExhaustive} from '../Utils/utils';
import {FlowType} from './FlowTypes';
export const DEBUG = false;
export type Type =
| {kind: 'Concrete'; type: ConcreteType<Type>; platform: Platform}
| {kind: 'Variable'; id: VariableId};
export type ResolvedType = {
kind: 'Concrete';
type: ConcreteType<ResolvedType>;
platform: Platform;
};
export type ComponentType<T> = {
kind: 'Component';
props: Map<string, T>;
children: null | T;
};
export type ConcreteType<T> =
| {kind: 'Enum'}
| {kind: 'Mixed'}
| {kind: 'Number'}
| {kind: 'String'}
| {kind: 'Boolean'}
| {kind: 'Void'}
| {kind: 'Nullable'; type: T}
| {kind: 'Array'; element: T}
| {kind: 'Set'; element: T}
| {kind: 'Map'; key: T; value: T}
| {
kind: 'Function';
typeParameters: null | Array<TypeParameter<T>>;
params: Array<T>;
returnType: T;
}
| ComponentType<T>
| {kind: 'Generic'; id: TypeParameterId; bound: T}
| {
kind: 'Object';
id: NominalId;
members: Map<string, ResolvedType>;
}
| {
kind: 'Tuple';
id: NominalId;
members: Array<T>;
}
| {kind: 'Structural'; id: LinearId}
// ... (935 more lines)
Domain
Subdomains
Functions
- Primitives.boolean()
- Primitives.enum()
- Primitives.mixed()
- Primitives.number()
- Primitives.string()
- Primitives.todo()
- Primitives.void()
- Resolved.array()
- Resolved.class()
- Resolved.component()
- Resolved.function()
- Resolved.generic()
- Resolved.map()
- Resolved.nullable()
- Resolved.object()
- Resolved.set()
- Resolved.tuple()
- Resolved.union()
- buildTypeEnvironment()
- convertFlowType()
- makeLinearId()
- makeNominalId()
- makeTypeParameterId()
- makeVariableId()
- printConcrete()
- printResolved()
- printType()
- serializeLoc()
Classes
Types
Dependencies
Imported By
Source
Frequently Asked Questions
What does Types.ts do?
Types.ts is a source file in the react codebase, written in typescript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in Types.ts?
Types.ts defines 28 function(s): Primitives.boolean, Primitives.enum, Primitives.mixed, Primitives.number, Primitives.string, Primitives.todo, Primitives.void, Resolved.array, Resolved.class, Resolved.component, and 18 more.
What does Types.ts depend on?
Types.ts imports 8 module(s): .., FlowType, FlowTypes.ts, TypeErrors.ts, assertExhaustive, index.ts, types, utils.ts.
What files import Types.ts?
Types.ts is imported by 3 file(s): Environment.ts, TypeErrors.ts, TypeUtils.ts.
Where is Types.ts in the architecture?
Types.ts is located at compiler/packages/babel-plugin-react-compiler/src/Flood/Types.ts (domain: BabelCompiler, subdomain: Validation, directory: compiler/packages/babel-plugin-react-compiler/src/Flood).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free