CombineDisposable
A DisposableEx that combines multiple disposables and disposes all of them when it is disposed.
Import:
import { CombineDisposable } from 'obsidian-dev-utils/disposable';Signature:
export class CombineDisposable extends DisposableBaseExtends: DisposableBase
Constructor
new CombineDisposable(params: CombineDisposableConstructorParams)Creates a new instance of CombineDisposable.
Properties
| Property | Type | Description |
|---|---|---|
| multipleDisposeBehavior | MultipleDisposeBehavior | How the disposable behaves when disposed more than once. (Inherited from DisposableBase) |
Methods
| Method | Returns | Description |
|---|---|---|
| [Symbol.dispose]() | void | Disposes the object by running DisposableBase.performDispose, honoring the configured MultipleDisposeBehavior on a repeat dispose. (Inherited from DisposableBase) |
| dispose() | void | Disposes the object. Convenience alias that delegates to this[Symbol.dispose]().(Inherited from DisposableBase) |
| performDispose() | void | Disposes all combined children in the configured DisposeOrder, applying the configured DisposeErrorBehavior when a child throws. |
Links to this page: