infer-global-object.js — react Source File
Architecture documentation for infer-global-object.js, a javascript file in the react codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 6983f161_90d7_a979_e316_f0a3f3950f06["infer-global-object.js"] 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"] 6983f161_90d7_a979_e316_f0a3f3950f06 --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05 style 6983f161_90d7_a979_e316_f0a3f3950f06 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import {identity, sum} from 'shared-runtime';
// Check that we correctly resolve type and effect lookups on the javascript
// global object.
function Component(props) {
let neverAliasedOrMutated = identity(props.b);
let primitiveVal1 = Math.max(props.a, neverAliasedOrMutated);
let primitiveVal2 = Infinity;
let primitiveVal3 = globalThis.globalThis.NaN;
// Even though we don't know the function signature of sum,
// we should be able to infer that it does not mutate its inputs.
sum(primitiveVal1, primitiveVal2, primitiveVal3);
return {primitiveVal1, primitiveVal2, primitiveVal3};
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{a: 1, b: 2}],
isComponent: false,
};
Domain
Subdomains
Functions
Dependencies
- shared-runtime
Source
Frequently Asked Questions
What does infer-global-object.js do?
infer-global-object.js is a source file in the react codebase, written in javascript. It belongs to the TestingUtilities domain, Fixtures subdomain.
What functions are defined in infer-global-object.js?
infer-global-object.js defines 1 function(s): Component.
What does infer-global-object.js depend on?
infer-global-object.js imports 1 module(s): shared-runtime.
Where is infer-global-object.js in the architecture?
infer-global-object.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/infer-global-object.js (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free