Home / Function/ countUniqueLocInEvents() — react Function Reference

countUniqueLocInEvents() — react Function Reference

Architecture documentation for the countUniqueLocInEvents() function in reactCompiler.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  ce908a2a_492d_1c95_b833_5bbc34027960["countUniqueLocInEvents()"]
  73dc1103_e33f_6e55_0717_0792300bc7e8["reactCompiler.ts"]
  ce908a2a_492d_1c95_b833_5bbc34027960 -->|defined in| 73dc1103_e33f_6e55_0717_0792300bc7e8
  3e1bfdca_c4a0_383f_9988_fc65b53a48e6["default.report()"]
  3e1bfdca_c4a0_383f_9988_fc65b53a48e6 -->|calls| ce908a2a_492d_1c95_b833_5bbc34027960
  style ce908a2a_492d_1c95_b833_5bbc34027960 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/react-compiler-healthcheck/src/checks/reactCompiler.ts lines 121–133

function countUniqueLocInEvents(events: Array<LoggerEvent>): number {
  const seenLocs = new Set<string>();
  let count = 0;
  for (const e of events) {
    if (e.filename != null && e.fnLoc != null) {
      seenLocs.add(`${e.filename}:${e.fnLoc.start}:${e.fnLoc.end}`);
    } else {
      // failed to dedup due to lack of source locations
      count++;
    }
  }
  return count + seenLocs.size;
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does countUniqueLocInEvents() do?
countUniqueLocInEvents() is a function in the react codebase, defined in compiler/packages/react-compiler-healthcheck/src/checks/reactCompiler.ts.
Where is countUniqueLocInEvents() defined?
countUniqueLocInEvents() is defined in compiler/packages/react-compiler-healthcheck/src/checks/reactCompiler.ts at line 121.
What calls countUniqueLocInEvents()?
countUniqueLocInEvents() is called by 1 function(s): default.report.

Analyze Your Own Codebase

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

Try Supermodel Free