An event emitter can be used to create and manage an {@link Event} for others to subscribe to. One emitter always owns one event.

Use this class if you want to provide event from within your extension, for instance inside a {@link TextDocumentContentProvider} or when providing API to other extensions.

Constructor

new()

Variables

event:Event<T>

The event listeners can subscribe to.

Methods

dispose():Void

Dispose this object and free resources.

fire(?data:T):Void

Notify all subscribers of the {@link EventEmitter.event event}. Failure of one or more listener will not fail this function call.

Parameters:

data

The event object.