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

Constructors

Properties

code?: string | number | {
    target: Uri;
    value: string | number;
}

A code or identifier for this diagnostic. Should be used for later processing, e.g. when providing code actions.

Type declaration

  • target: Uri

    A target URI to open with more information about the diagnostic error.

  • value: string | number

    A code or identifier for this diagnostic. Should be used for later processing, e.g. when providing code actions.

message: string

The human-readable message.

range: Range

The range to which this diagnostic applies.

relatedInformation?: DiagnosticRelatedInformation[]

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

The severity, default is error.

source?: string

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

tags?: DiagnosticTag[]

Additional metadata about the diagnostic.