Home / File/ throw-before-scope-starts.ts — react Source File

throw-before-scope-starts.ts — react Source File

Architecture documentation for throw-before-scope-starts.ts, a typescript file in the react codebase. 1 imports, 0 dependents.

File typescript TestingUtilities Fixtures 1 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  6f028315_b193_7bbf_51aa_cb43851b0f4d["throw-before-scope-starts.ts"]
  006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"]
  6f028315_b193_7bbf_51aa_cb43851b0f4d --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05
  style 6f028315_b193_7bbf_51aa_cb43851b0f4d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import {arrayPush} from 'shared-runtime';

function useFoo({input, cond}) {
  if (cond) {
    throw new Error('throw with error!');
  }

  // unconditional
  const x = [];
  arrayPush(x, input.a.b);
  return x;
}

export const FIXTURE_ENTRYPOINT = {
  fn: useFoo,
  params: [{input: {a: {b: 2}}, cond: false}],
  sequentialRenders: [
    {input: null, cond: true},
    {input: {a: {b: 2}}, cond: false},
    {input: null, cond: true},
    // preserve nullthrows
    {input: {}, cond: false},
    {input: {a: {b: null}}, cond: false},
    {input: {a: null}, cond: false},
    {input: {a: {b: 3}}, cond: false},
  ],
};

Subdomains

Functions

Dependencies

  • shared-runtime

Frequently Asked Questions

What does throw-before-scope-starts.ts do?
throw-before-scope-starts.ts is a source file in the react codebase, written in typescript. It belongs to the TestingUtilities domain, Fixtures subdomain.
What functions are defined in throw-before-scope-starts.ts?
throw-before-scope-starts.ts defines 1 function(s): useFoo.
What does throw-before-scope-starts.ts depend on?
throw-before-scope-starts.ts imports 1 module(s): shared-runtime.
Where is throw-before-scope-starts.ts in the architecture?
throw-before-scope-starts.ts is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/reduce-reactive-deps/jump-unpoisoned/throw-before-scope-starts.ts (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/reduce-reactive-deps/jump-unpoisoned).

Analyze Your Own Codebase

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

Try Supermodel Free