Interface: Event()\

January 3, 2026 ยท View on GitHub

vscode-arduino-api


Interface: Event()<T>

Represents a typed event.

A function that represents an event to which you subscribe by calling it with a listener function as argument.

Example

item.onDidChange(function (event) {
  console.log('Event happened: ' + event)
})

Type Parameters

T

T

Event(listener, thisArgs?, disposables?): Disposable

A function that represents an event to which you subscribe by calling it with a listener function as argument.

Parameters

listener

(e) => any

The listener function will be called when the event happens.

thisArgs?

any

The this-argument which will be used when calling the event listener.

disposables?

Disposable[]

An array to which a Disposable will be added.

Returns

Disposable

A disposable which unsubscribes the event listener.