DiagnosticCollection

A diagnostics collection is a container that manages a set of diagnostics. Diagnostics are always scopes to a diagnostics collection and a resource.

To get an instance of a DiagnosticCollection use createDiagnosticCollection.

Online Documentation

Properties

Link copied to clipboard
abstract val name: String

The name of this diagnostic collection, for instance typescript. Every diagnostic from this collection will be associated with this name. Also, the task framework uses this name when defining problem matchers.

Functions

Link copied to clipboard
abstract fun clear()

Remove all diagnostics from this collection. The same as calling #set(undefined);

Link copied to clipboard
abstract fun delete(uri: Uri)

Remove all diagnostics from this collection that belong to the provided uri. The same as #set(uri, undefined).

Link copied to clipboard
abstract override fun dispose()

Dispose and free associated resources. Calls clear.

Link copied to clipboard
abstract fun forEach(callback: (uri: Uri, ReadonlyArray<Diagnostic>, collection: DiagnosticCollection) -> Unit, thisArg: JsAny? = definedExternally)

Iterate over each entry in this collection.

Link copied to clipboard
open operator fun get(key: Symbol.iterator): () -> JsIterator<Tuple2<Uri, ReadonlyArray<Diagnostic>>>

abstract fun get(uri: Uri): ReadonlyArray<Diagnostic>?

Get the diagnostics for a given resource. Note that you cannot modify the diagnostics-array returned from this call.

Link copied to clipboard
abstract fun has(uri: Uri): Boolean

Check if this collection contains diagnostics for a given resource.

Link copied to clipboard
abstract fun set(entries: ReadonlyArray<Tuple2<Uri, ReadonlyArray<Diagnostic>?>>)

Replace diagnostics for multiple resources in this collection.

abstract fun set(uri: Uri, diagnostics: ReadonlyArray<Diagnostic>?)

Assign diagnostics for given resource. Will replace existing diagnostics for that resource.