Home / File/ reduce-if-nonexhaustive-poisoned-deps.ts — react Source File

reduce-if-nonexhaustive-poisoned-deps.ts — react Source File

Architecture documentation for reduce-if-nonexhaustive-poisoned-deps.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
  314db397_aabf_b737_aa54_e254776e5162["reduce-if-nonexhaustive-poisoned-deps.ts"]
  006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"]
  314db397_aabf_b737_aa54_e254776e5162 --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05
  style 314db397_aabf_b737_aa54_e254776e5162 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import {identity} from 'shared-runtime';

function useFoo({input, cond, hasAB}) {
  const x = [];
  if (cond) {
    if (!hasAB) {
      return null;
    }
    x.push(identity(input.a.b));
  } else {
    x.push(identity(input.a.b));
  }
  return x;
}

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

Subdomains

Functions

Dependencies

  • shared-runtime

Frequently Asked Questions

What does reduce-if-nonexhaustive-poisoned-deps.ts do?
reduce-if-nonexhaustive-poisoned-deps.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 reduce-if-nonexhaustive-poisoned-deps.ts?
reduce-if-nonexhaustive-poisoned-deps.ts defines 1 function(s): useFoo.
What does reduce-if-nonexhaustive-poisoned-deps.ts depend on?
reduce-if-nonexhaustive-poisoned-deps.ts imports 1 module(s): shared-runtime.
Where is reduce-if-nonexhaustive-poisoned-deps.ts in the architecture?
reduce-if-nonexhaustive-poisoned-deps.ts is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/reduce-reactive-deps/jump-poisoned/reduce-if-nonexhaustive-poisoned-deps.ts (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/reduce-reactive-deps/jump-poisoned).

Analyze Your Own Codebase

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

Try Supermodel Free