Diagnostic class

Diagnostic class

Constructors

Diagnostic(Range, string, DiagnosticSeverity, string, string)

Creates a new instance of the Diagnostic class.

Properties

code
message
range
severity
source

Methods

toString()

Returns a string that represents the current Diagnostic object.

Constructor Details

Diagnostic(Range, string, DiagnosticSeverity, string, string)

Creates a new instance of the Diagnostic class.

new Diagnostic(range: Range, message: string, severity: DiagnosticSeverity, source?: string, code?: string)

Parameters

range
Range

Range where the error or warning occurred.

message

string

Error message of the error or warning.

severity
DiagnosticSeverity

Severity of the error or warning.

source

string

Source of the error or warning occurred.

code

string

Code or identifier of the error or warning.

Property Details

code

code: string

Property Value

string

message

message: string

Property Value

string

range

range: Range

Property Value

severity

severity: DiagnosticSeverity

Property Value

source

source: string

Property Value

string

Method Details

toString()

Returns a string that represents the current Diagnostic object.

function toString(): string

Returns

string

A string that represents the current Diagnostic.