Home / Function/ isAutodepsSigil() — react Function Reference

isAutodepsSigil() — react Function Reference

Architecture documentation for the isAutodepsSigil() function in ValidateNoUntransformedReferences.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  e2971c97_b8a2_4f40_55f3_7253fdfac959["isAutodepsSigil()"]
  0f2acb63_4ffb_0629_ed45_15b4fe48cd90["ValidateNoUntransformedReferences.ts"]
  e2971c97_b8a2_4f40_55f3_7253fdfac959 -->|defined in| 0f2acb63_4ffb_0629_ed45_15b4fe48cd90
  style e2971c97_b8a2_4f40_55f3_7253fdfac959 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/Entrypoint/ValidateNoUntransformedReferences.ts lines 34–65

function isAutodepsSigil(
  arg: NodePath<t.ArgumentPlaceholder | t.SpreadElement | t.Expression>,
): boolean {
  // Check for AUTODEPS identifier imported from React
  if (arg.isIdentifier() && arg.node.name === 'AUTODEPS') {
    const binding = arg.scope.getBinding(arg.node.name);
    if (binding && binding.path.isImportSpecifier()) {
      const importSpecifier = binding.path.node as t.ImportSpecifier;
      if (importSpecifier.imported.type === 'Identifier') {
        return (importSpecifier.imported as t.Identifier).name === 'AUTODEPS';
      }
    }
    return false;
  }

  // Check for React.AUTODEPS member expression
  if (arg.isMemberExpression() && !arg.node.computed) {
    const object = arg.get('object');
    const property = arg.get('property');

    if (
      object.isIdentifier() &&
      object.node.name === 'React' &&
      property.isIdentifier() &&
      property.node.name === 'AUTODEPS'
    ) {
      return true;
    }
  }

  return false;
}

Domain

Subdomains

Frequently Asked Questions

What does isAutodepsSigil() do?
isAutodepsSigil() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Entrypoint/ValidateNoUntransformedReferences.ts.
Where is isAutodepsSigil() defined?
isAutodepsSigil() is defined in compiler/packages/babel-plugin-react-compiler/src/Entrypoint/ValidateNoUntransformedReferences.ts at line 34.

Analyze Your Own Codebase

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

Try Supermodel Free