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}.
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.
source:Null<String>
A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'.