Logo Xantham

DiagnosticResponse Type

DiagnosticResponse is the API response for a single diagnostic.

Record fields

Record Field Description

Category

Full Usage: Category

Field type: int

Category is the diagnostic category (error, warning, suggestion, message).

Field type: int

Code

Full Usage: Code

Field type: int

Code is the diagnostic error code.

Field type: int

End

Full Usage: End

Field type: int

End is the end position of the diagnostic in the source file.

Field type: int

EndPosition

Full Usage: EndPosition

Field type: DiagnosticPositionResponse voption

EndPosition is the zero-based line and UTF-16 character position of End.

Field type: DiagnosticPositionResponse voption

FileName

Full Usage: FileName

Field type: string voption

FileName is the path of the file this diagnostic belongs to, if any.

Field type: string voption

MessageChain

Full Usage: MessageChain

Field type: DiagnosticResponse[] voption

MessageChain contains chained diagnostic messages, if any.

Field type: DiagnosticResponse[] voption

Pos

Full Usage: Pos

Field type: int

Pos is the start position of the diagnostic in the source file.

Field type: int

RelatedInformation

Full Usage: RelatedInformation

Field type: DiagnosticResponse[] voption

RelatedInformation contains related diagnostic information, if any.

Field type: DiagnosticResponse[] voption

ReportsDeprecated

Full Usage: ReportsDeprecated

Field type: bool voption

ReportsDeprecated indicates this diagnostic highlights deprecated code.

Field type: bool voption

ReportsUnnecessary

Full Usage: ReportsUnnecessary

Field type: bool voption

ReportsUnnecessary indicates this diagnostic highlights unnecessary code.

Field type: bool voption

Source

Full Usage: Source

Field type: string voption

Source is a custom diagnostic-code prefix. An empty value uses the default "TS".

Field type: string voption

SourceLines

Full Usage: SourceLines

Field type: DiagnosticSourceLineResponse[] voption

SourceLines contains the source lines needed to render this diagnostic with context.

Field type: DiagnosticSourceLineResponse[] voption

StartPosition

Full Usage: StartPosition

Field type: DiagnosticPositionResponse voption

StartPosition is the zero-based line and UTF-16 character position of Pos.

Field type: DiagnosticPositionResponse voption

Text

Full Usage: Text

Field type: string

Text is the localized diagnostic message text.

Field type: string

Type something to start searching.