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