Home / File/ try-catch-in-nested-scope.ts — react Source File

try-catch-in-nested-scope.ts — react Source File

Architecture documentation for try-catch-in-nested-scope.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
  a2be9e1f_d422_3655_cf37_bc665d838d25["try-catch-in-nested-scope.ts"]
  006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"]
  a2be9e1f_d422_3655_cf37_bc665d838d25 --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05
  style a2be9e1f_d422_3655_cf37_bc665d838d25 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import {mutate, setProperty, throwErrorWithMessageIf} from 'shared-runtime';

function useFoo({value, cond}) {
  let y = [value];
  let x = {cond};

  try {
    mutate(x);
    throwErrorWithMessageIf(x.cond, 'error');
  } catch {
    setProperty(x, 'henderson');
    return x;
  }
  setProperty(x, 'nevada');
  y.push(x);

  return y;
}

export const FIXTURE_ENTRYPOINT = {
  fn: useFoo,
  params: [{value: 4, cond: true}],
  sequentialRenders: [
    {value: 4, cond: true},
    {value: 5, cond: true},
    {value: 5, cond: false},
  ],
};

Subdomains

Functions

Dependencies

  • shared-runtime

Frequently Asked Questions

What does try-catch-in-nested-scope.ts do?
try-catch-in-nested-scope.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 try-catch-in-nested-scope.ts?
try-catch-in-nested-scope.ts defines 1 function(s): useFoo.
What does try-catch-in-nested-scope.ts depend on?
try-catch-in-nested-scope.ts imports 1 module(s): shared-runtime.
Where is try-catch-in-nested-scope.ts in the architecture?
try-catch-in-nested-scope.ts is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/try-catch-in-nested-scope.ts (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