← API reference

//editor-web/com.aardarch.aardink.web/WebDiagnostic

WebDiagnostic

@Serializabledata class WebDiagnostic(val line: Int, val startColumn: Int, val endColumn: Int, val message: String, val severity: String = “error”, val endLineNumber: Int? = null, val source: String? = null, val code: String? = null, val codeHref: String? = null, val tags: List<Int>? = null, val relatedInformation: List<WebRelatedInformation>? = null)

A diagnostic as a web host describes it — the shape of a Monaco marker, so hosts moving off Monaco can pass theirs through unchanged, and the shape AardinkWeb.onDiagnosticsChange reports the language’s own in. Lines and columns are 1-based, and endColumn is exclusive. It runs from line to endLineNumber (line when absent); a position past the end of its line is the line’s end.

Constructors

NameSummary
WebDiagnosticconstructor(line: Int, startColumn: Int, endColumn: Int, message: String, severity: String = “error”, endLineNumber: Int? = null, source: String? = null, code: String? = null, codeHref: String? = null, tags: List<Int>? = null, relatedInformation: List<WebRelatedInformation>? = null)

Properties

NameSummary
codeval code: String?
The producer’s identifier for this kind of problem, shown after source.
codeHrefval codeHref: String?
Where code is explained (Monaco’s code.target).
endColumnval endColumn: Int
endLineNumberval endLineNumber: Int?
lineval line: Int
messageval message: String
relatedInformationval relatedInformation: List<WebRelatedInformation>?
severityval severity: String
"error", "warning", "info" or "hint"; anything else is treated as "info".
sourceval source: String?
startColumnval startColumn: Int
tagsval tags: List<Int>?
Monaco’s MarkerTags: 1 unnecessary (drawn faded), 2 deprecated (struck through).