Home / Function/ validateEnvironmentConfig() — react Function Reference

validateEnvironmentConfig() — react Function Reference

Architecture documentation for the validateEnvironmentConfig() function in Environment.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  6c1acf23_fc6a_ba55_a3da_d74bda8bb5a5["validateEnvironmentConfig()"]
  1b971013_8a90_0d8d_1fcc_f31581cd66aa["Environment.ts"]
  6c1acf23_fc6a_ba55_a3da_d74bda8bb5a5 -->|defined in| 1b971013_8a90_0d8d_1fcc_f31581cd66aa
  f4dabc03_d648_e2d6_19ef_83872ae711d3["throwInvalidConfig()"]
  6c1acf23_fc6a_ba55_a3da_d74bda8bb5a5 -->|calls| f4dabc03_d648_e2d6_19ef_83872ae711d3
  style 6c1acf23_fc6a_ba55_a3da_d74bda8bb5a5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts lines 1260–1275

export function validateEnvironmentConfig(
  partialConfig: PartialEnvironmentConfig,
): EnvironmentConfig {
  const config = EnvironmentConfigSchema.safeParse(partialConfig);
  if (config.success) {
    return config.data;
  }

  CompilerError.throwInvalidConfig({
    reason:
      'Could not validate environment config. Update React Compiler config to fix the error',
    description: `${fromZodError(config.error)}`,
    loc: null,
    suggestions: null,
  });
}

Subdomains

Frequently Asked Questions

What does validateEnvironmentConfig() do?
validateEnvironmentConfig() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts.
Where is validateEnvironmentConfig() defined?
validateEnvironmentConfig() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts at line 1260.
What does validateEnvironmentConfig() call?
validateEnvironmentConfig() calls 1 function(s): throwInvalidConfig.

Analyze Your Own Codebase

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

Try Supermodel Free