OptionalcodeThe diagnostic's code, which usually appear in the user interface.
OptionalcodeAn optional property to describe the error code. Requires the code field (above) to be present/not null.
OptionaldataA data entry field that is preserved between a textDocument/publishDiagnostics
notification and textDocument/codeAction request.
The diagnostic's message. It usually appears in the user interface
The range at which the message applies
OptionalrelatedAn array of related diagnostic information, e.g. when symbol-names within a scope collide all definitions can be marked via this property.
OptionalseverityThe diagnostic's severity. To avoid interpretation mismatches when a server is used with different clients it is highly recommended that servers always provide a severity value.
OptionalsourceA human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'. It usually appears in the user interface.
OptionaltagsAdditional metadata about the diagnostic.
Represents a diagnostic, such as a compiler error or warning. Diagnostic objects are only valid in the scope of a resource.