Skip to content

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 DisposableBase

Extends: DisposableBase

Constructor

new CombineDisposable(params: CombineDisposableConstructorParams)

Creates a new instance of CombineDisposable.

Properties

PropertyTypeDescription
multipleDisposeBehaviorMultipleDisposeBehaviorHow the disposable behaves when disposed more than once.
(Inherited from DisposableBase)

Methods

MethodReturnsDescription
[Symbol.dispose]()voidDisposes the object by running DisposableBase.performDispose, honoring the configured MultipleDisposeBehavior on a repeat dispose.
(Inherited from DisposableBase)
dispose()voidDisposes the object. Convenience alias that delegates to this[Symbol.dispose]().
(Inherited from DisposableBase)
performDispose()voidDisposes all combined children in the configured DisposeOrder, applying the configured DisposeErrorBehavior when a child throws.

Links to this page: