Creates a new diagnostic object.
The range to which this diagnostic applies.
The human-readable message.
The severity, default is error.
The range to which this diagnostic applies.
The human-readable message.
The severity, default is error.
A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'.
A code or identifier for this diagnostic. Should be used for later processing, e.g. when providing code actions.
An array of related diagnostic information, e.g. when symbol-names within a scope collide all definitions can be marked via this property.
Additional metadata about the diagnostic.
友链:VS Code 中文文档 | VS Code 官网文档 | VS Code 扩展市场
Represents a diagnostic, such as a compiler error or warning. Diagnostic objects are only valid in the scope of a file.