Home / Function/ matchCompilerDiagnostic() — react Function Reference

matchCompilerDiagnostic() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  13979066_5844_9e9b_3dd1_d031ec964de0["matchCompilerDiagnostic()"]
  93f3a2c7_a7ce_3c94_87fe_ee7d66d9b64b["ValidateNoUntransformedReferences.ts"]
  13979066_5844_9e9b_3dd1_d031ec964de0 -->|defined in| 93f3a2c7_a7ce_3c94_87fe_ee7d66d9b64b
  6eae54a5_62d8_1643_47df_9a08317a25f0["assertValidEffectImportReference()"]
  6eae54a5_62d8_1643_47df_9a08317a25f0 -->|calls| 13979066_5844_9e9b_3dd1_d031ec964de0
  b787f702_4820_222e_b5ea_b5e4b91c803c["assertValidFireImportReference()"]
  b787f702_4820_222e_b5ea_b5e4b91c803c -->|calls| 13979066_5844_9e9b_3dd1_d031ec964de0
  00c689b1_d881_800b_f1df_076ada6a2c75["toString()"]
  13979066_5844_9e9b_3dd1_d031ec964de0 -->|calls| 00c689b1_d881_800b_f1df_076ada6a2c75
  style 13979066_5844_9e9b_3dd1_d031ec964de0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/Entrypoint/ValidateNoUntransformedReferences.ts lines 317–327

function matchCompilerDiagnostic(
  badReference: NodePath<t.Node>,
  transformErrors: Array<{fn: NodePath<t.Node>; error: CompilerError}>,
): string | null {
  for (const {fn, error} of transformErrors) {
    if (fn.isAncestor(badReference)) {
      return error.toString();
    }
  }
  return null;
}

Domain

Subdomains

Calls

Frequently Asked Questions

What does matchCompilerDiagnostic() do?
matchCompilerDiagnostic() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Entrypoint/ValidateNoUntransformedReferences.ts.
Where is matchCompilerDiagnostic() defined?
matchCompilerDiagnostic() is defined in compiler/packages/babel-plugin-react-compiler/src/Entrypoint/ValidateNoUntransformedReferences.ts at line 317.
What does matchCompilerDiagnostic() call?
matchCompilerDiagnostic() calls 1 function(s): toString.
What calls matchCompilerDiagnostic()?
matchCompilerDiagnostic() is called by 2 function(s): assertValidEffectImportReference, assertValidFireImportReference.

Analyze Your Own Codebase

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

Try Supermodel Free