Class: Disposable
Extended by
Constructors
new Disposable()
new Disposable(
func
):Disposable
Parameters
func
() => void
Returns
Defined in
packages/extension-api/src/extension-api.d.ts:91
new Disposable()
new Disposable(
callOnDispose
):Disposable
Creates a new Disposable calling the provided function on dispose.
Parameters
callOnDispose
Function
Function that disposes something.
Returns
Defined in
packages/extension-api/src/extension-api.d.ts:98
Methods
dispose()
dispose():
void
Dispose this object.
Returns
void
Defined in
packages/extension-api/src/extension-api.d.ts:103
create()
static
create(func
):Disposable
Parameters
func
() => void
Returns
Defined in
packages/extension-api/src/extension-api.d.ts:105
from()
static
from(...disposableLikes
):Disposable
Combine many disposable-likes into one. Use this method when having objects with a dispose function which are not instances of Disposable.
Parameters
disposableLikes
...object
[]
Objects that have at least a dispose
-function member.
Returns
Returns a new disposable which, upon dispose, will dispose all provided disposables.