Documentation / base / IDisposable
Interface: IDisposable
Defined in: libs/base/src/ref.ts:8
Represents an object that can be disposed
Extends
IEventTarget<{dispose: []; }>
Properties
[EventMapType]?
readonlyoptional[EventMapType]?:object
Defined in: libs/base/src/event.ts:54
Type-only event map marker.
dispose
dispose: []
Inherited from
disposed
readonlydisposed:boolean
Defined in: libs/base/src/ref.ts:10
Methods
on()
on<
K>(type,listener,context?):void
Defined in: libs/base/src/event.ts:61
Sets up a function that will be called whenever the specified event is delivered to the target
Type Parameters
K
K extends "dispose"
Parameters
type
K
The event type to listen for
listener
EventListener<{ dispose: []; }, K>
The callback function
context?
unknown
Context object of the listener function
Returns
void
Inherited from
once()
once<
K>(type,listener,context?):void
Defined in: libs/base/src/event.ts:68
Sets up a function that will be called only once when the specified event is delivered to the target
Type Parameters
K
K extends "dispose"
Parameters
type
K
The event type to listen for
listener
EventListener<{ dispose: []; }, K>
The callback function
context?
unknown
Context object of the listener function
Returns
void
Inherited from
off()
off<
K>(type,listener?,context?):void
Defined in: libs/base/src/event.ts:74
Removes an event listener function previously registered.
Type Parameters
K
K extends "dispose"
Parameters
type
K
The event type for which to remove an event listener
listener?
EventListener<{ dispose: []; }>
The callback function to be removed
context?
unknown
Returns
void
Inherited from
dispatchEvent()
dispatchEvent<
K>(type, ...args):void
Defined in: libs/base/src/event.ts:80
Synchronously invoke the affected event listeners with an event object
Type Parameters
K
K extends "dispose"
Parameters
type
K
args
...object[K]
Returns
void
false if the event was canceled, otherwise true
Inherited from
dispose()
dispose():
void
Defined in: libs/base/src/ref.ts:9
Returns
void