type-inference-array-from.js — react Source File
Architecture documentation for type-inference-array-from.js, a javascript file in the react codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR c8112e59_88a2_c97f_4b4e_22b48f7cfaa9["type-inference-array-from.js"] 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"] c8112e59_88a2_c97f_4b4e_22b48f7cfaa9 --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05 style c8112e59_88a2_c97f_4b4e_22b48f7cfaa9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import {useIdentity, ValidateMemoization} from 'shared-runtime';
/**
* Fixture to assert that we can infer the type and effects of an array created
* with `Array.from`.
*/
function Validate({x, val1, val2}) {
'use no memo';
return (
<>
<ValidateMemoization
inputs={[val1]}
output={x[0]}
onlyCheckCompiled={true}
/>
<ValidateMemoization
inputs={[val2]}
output={x[1]}
onlyCheckCompiled={true}
/>
</>
);
}
function useFoo({val1, val2}) {
'use memo';
const x = Array.from([]);
useIdentity();
x.push([val1]);
x.push([val2]);
return <Validate x={x} val1={val1} val2={val2} />;
}
export const FIXTURE_ENTRYPOINT = {
fn: useFoo,
params: [{val1: 1, val2: 2}],
params: [
{val1: 1, val2: 2},
{val1: 1, val2: 2},
{val1: 1, val2: 3},
{val1: 4, val2: 2},
],
};
Domain
Subdomains
Functions
Dependencies
- shared-runtime
Source
Frequently Asked Questions
What does type-inference-array-from.js do?
type-inference-array-from.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 type-inference-array-from.js?
type-inference-array-from.js defines 2 function(s): Validate, useFoo.
What does type-inference-array-from.js depend on?
type-inference-array-from.js imports 1 module(s): shared-runtime.
Where is type-inference-array-from.js in the architecture?
type-inference-array-from.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/type-inference-array-from.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