EventEmitter<T> class

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.

Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

EventEmitter()

Properties

event Event<T>

Available on EventEmitter<T>, provided by the EventEmitter$Typings extension

The event listeners can subscribe to.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void

Available on EventEmitter<T>, provided by the EventEmitter$Typings extension

Dispose this object and free resources.
fire(T data) → void

Available on EventEmitter<T>, provided by the EventEmitter$Typings extension

Notify all subscribers of the {@link EventEmitter.event event}. Failure of one or more listener will not fail this function call.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited