Represents a diagnostic, such as a compiler error or warning. Diagnostic objects are only valid in the scope of a file.

Constructor

new(range:Range, message:String, ?severity:DiagnosticSeverity)

Creates a new diagnostic object.

@link DiagnosticSeverity.Error error}.

Parameters:

range

The range to which this diagnostic applies.

message

The human-readable message.

severity

The severity, default is {

Variables

code:Null<EitherType<String, EitherType<Int, {value:EitherType<String, Int>, target:Uri}>>>

A code or identifier for this diagnostic. Should be used for later processing, e.g. when providing {@link CodeActionContext code actions}.

message:String

The human-readable message.

range:Range

The range to which this diagnostic applies.

relatedInformation:Null<Array<DiagnosticRelatedInformation>>

An array of related diagnostic information, e.g. when symbol-names within a scope collide all definitions can be marked via this property.

severity:DiagnosticSeverity

The severity, default is {@link DiagnosticSeverity.Error error}.

source:Null<String>

A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'.

tags:Null<Array<DiagnosticTag>>

Additional metadata about the diagnostic.