Home / Function/ mapReactCompilerDiagnosticToMonacoMarker() — react Function Reference

mapReactCompilerDiagnosticToMonacoMarker() — react Function Reference

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

Function typescript PlaygroundApp Stores calls 1 called by 1

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

compiler/apps/playground/lib/reactCompilerMonacoDiagnostics.ts lines 28–47

function mapReactCompilerDiagnosticToMonacoMarker(
  detail: CompilerErrorDetail | CompilerDiagnostic,
  monaco: Monaco,
  source: string,
): editor.IMarkerData | null {
  const loc = detail.primaryLocation();
  if (loc == null || typeof loc === 'symbol') {
    return null;
  }
  const severity = mapReactCompilerSeverityToMonaco(detail.severity, monaco);
  let message = detail.printErrorMessage(source, {eslint: true});
  return {
    severity,
    message,
    startLineNumber: loc.start.line,
    startColumn: loc.start.column + 1,
    endLineNumber: loc.end.line,
    endColumn: loc.end.column + 1,
  };
}

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free