Home / Function/ renderReactCompilerMarkers() — react Function Reference

renderReactCompilerMarkers() — react Function Reference

Architecture documentation for the renderReactCompilerMarkers() function in reactCompilerMonacoDiagnostics.ts from the react codebase.

Function typescript PlaygroundApp Stores calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  ccff0127_f1ca_c8b6_a56a_96b843fe80f8["renderReactCompilerMarkers()"]
  39c8dc04_8ac1_438b_0e3a_3111834a5732["reactCompilerMonacoDiagnostics.ts"]
  ccff0127_f1ca_c8b6_a56a_96b843fe80f8 -->|defined in| 39c8dc04_8ac1_438b_0e3a_3111834a5732
  99f7f91e_9a0f_2ee9_8e38_6383bf6ab909["Input()"]
  99f7f91e_9a0f_2ee9_8e38_6383bf6ab909 -->|calls| ccff0127_f1ca_c8b6_a56a_96b843fe80f8
  cae17916_c5dd_fd4b_4994_7983487897db["mapReactCompilerDiagnosticToMonacoMarker()"]
  ccff0127_f1ca_c8b6_a56a_96b843fe80f8 -->|calls| cae17916_c5dd_fd4b_4994_7983487897db
  style ccff0127_f1ca_c8b6_a56a_96b843fe80f8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/apps/playground/lib/reactCompilerMonacoDiagnostics.ts lines 56–98

export function renderReactCompilerMarkers({
  monaco,
  model,
  details,
  source,
}: ReactCompilerMarkerConfig): void {
  const markers: Array<editor.IMarkerData> = [];
  for (const detail of details) {
    const marker = mapReactCompilerDiagnosticToMonacoMarker(
      detail,
      monaco,
      source,
    );
    if (marker == null) {
      continue;
    }
    markers.push(marker);
  }
  if (markers.length > 0) {
    monaco.editor.setModelMarkers(model, 'owner', markers);
    const newDecorations = markers.map(marker => {
      return {
        range: new monaco.Range(
          marker.startLineNumber,
          marker.startColumn,
          marker.endLineNumber,
          marker.endColumn,
        ),
        options: {
          isWholeLine: true,
          glyphMarginClassName: 'bg-red-300',
        },
      };
    });
    decorations = model.deltaDecorations(decorations, newDecorations);
  } else {
    monaco.editor.setModelMarkers(model, 'owner', []);
    decorations = model.deltaDecorations(
      model.getAllDecorations().map(d => d.id),
      [],
    );
  }
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does renderReactCompilerMarkers() do?
renderReactCompilerMarkers() is a function in the react codebase, defined in compiler/apps/playground/lib/reactCompilerMonacoDiagnostics.ts.
Where is renderReactCompilerMarkers() defined?
renderReactCompilerMarkers() is defined in compiler/apps/playground/lib/reactCompilerMonacoDiagnostics.ts at line 56.
What does renderReactCompilerMarkers() call?
renderReactCompilerMarkers() calls 1 function(s): mapReactCompilerDiagnosticToMonacoMarker.
What calls renderReactCompilerMarkers()?
renderReactCompilerMarkers() is called by 1 function(s): Input.

Analyze Your Own Codebase

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

Try Supermodel Free