Skip to content

[I] DiagnosticDefinition

Declare a diagnostic that can be reported by the library.

Example

unterminated: {
severity: "error",
description: "Unterminated token.",
url: "https://example.com/docs/diags/unterminated",
messages: {
default: paramMessage`Unterminated ${"token"}.`,
},
},

Type Parameters

Type Parameter
M extends DiagnosticMessages

Properties

PropertyModifierTypeDescription
description?readonlystringShort description of the diagnostic
messagesreadonlyMMessages that can be reported with the diagnostic.
severityreadonly"error" | "warning"Diagnostic severity. - warning - Suppressable, should be used to represent potential issues but not blocking. - error - Non-suppressable, should be used to represent failure to move forward.
url?readonlystringSpecifies the URL at which the full documentation can be accessed.