Skip to content

API reference / @jsprismarine/mcfunction / DiagnosticCollector

Class: DiagnosticCollector ​

Defined in: diagnostics.ts:58

Collects diagnostics in report order.

Constructors ​

Constructor ​

new DiagnosticCollector(): DiagnosticCollector

Returns ​

DiagnosticCollector

Properties ​

diagnostics ​

readonly diagnostics: Diagnostic[] = []

Defined in: diagnostics.ts:60

Everything reported so far, in the order it was reported.

Accessors ​

hasErrors ​

Get Signature ​

get hasErrors(): boolean

Defined in: diagnostics.ts:68

Whether any recorded diagnostic is an error.

Returns ​

boolean

Methods ​

add() ​

add(diagnostic): void

Defined in: diagnostics.ts:63

Records one diagnostic.

Parameters ​

diagnostic ​

Diagnostic

Returns ​

void