Skip to content

[I] DiagnosticCreator

Typed factory and reporting operations for a fixed set of diagnostic definitions.

Type Parameter
T extends object
PropertyModifierTypeDescription
diagnosticsreadonlyDiagnosticMap<T>Definitions used to determine severity and format messages.
typereadonlyTType-only carrier for message inference; not populated by the diagnostic creator at runtime.
createDiagnostic<C, M>(diag): Diagnostic;

Formats a diagnostic without reporting it. Throws if the code or selected message is not defined; library-scoped creators qualify the resulting diagnostic code.

Type ParameterDefault type
C extends string | number | symbol-
M extends string | number | symbol"default"
ParameterType
diagDiagnosticReport<T, C, M>

Diagnostic


reportDiagnostic<C, M>(program, diag): void;

Creates and reports the diagnostic through the program, which applies its reporting policies.

Type ParameterDefault type
C extends string | number | symbol-
M extends string | number | symbol"default"
ParameterType
programProgram
diagDiagnosticReport<T, C, M>

void