Home / Function/ isFilePartOfSources() — react Function Reference

isFilePartOfSources() — react Function Reference

Architecture documentation for the isFilePartOfSources() function in Program.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  586eb021_f5b7_f117_c3a5_c4b46ba97b61["isFilePartOfSources()"]
  9aa4477d_960b_1ea1_b6d9_36076aaa70bd["Program.ts"]
  586eb021_f5b7_f117_c3a5_c4b46ba97b61 -->|defined in| 9aa4477d_960b_1ea1_b6d9_36076aaa70bd
  9e49688f_6b43_84fe_0dd2_18e5142c1f71["shouldSkipCompilation()"]
  9e49688f_6b43_84fe_0dd2_18e5142c1f71 -->|calls| 586eb021_f5b7_f117_c3a5_c4b46ba97b61
  style 586eb021_f5b7_f117_c3a5_c4b46ba97b61 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Program.ts lines 336–351

function isFilePartOfSources(
  sources: Array<string> | ((filename: string) => boolean),
  filename: string,
): boolean {
  if (typeof sources === 'function') {
    return sources(filename);
  }

  for (const prefix of sources) {
    if (filename.indexOf(prefix) !== -1) {
      return true;
    }
  }

  return false;
}

Domain

Subdomains

Frequently Asked Questions

What does isFilePartOfSources() do?
isFilePartOfSources() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Program.ts.
Where is isFilePartOfSources() defined?
isFilePartOfSources() is defined in compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Program.ts at line 336.
What calls isFilePartOfSources()?
isFilePartOfSources() is called by 1 function(s): shouldSkipCompilation.

Analyze Your Own Codebase

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

Try Supermodel Free