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

Fields

@:optionaloptionaltags:Null<Array<DiagnosticTag>>

Additional metadata about the diagnostic.

Available since

3.15.0

.

@:optionaloptionalsource:Null<String>

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

@:optionaloptionalseverity:Null<DiagnosticSeverity>

The diagnostic's severity. If omitted it is up to the client to interpret diagnostics as error, warning, info or hint.

@:optionaloptionalrelatedInformation: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.

range:Range

The range at which the message applies

message:String

The diagnostic's message. It usually appears in the user interface

@:optionaloptionaldata:Null<LSPAny>

A data entry field that is preserved between a textDocument/publishDiagnostics notification and textDocument/codeAction request.

Available since

3.16.0

.

@:optionaloptionalcodeDescription:Null<CodeDescription>

An optional property to describe the error code. Requires the code field (above) to be present/not null.

Available since

3.16.0

.

@:optionaloptionalcode:Null<EitherType<Int, String>>

The diagnostic's code, which usually appear in the user interface.