Skip to content

obsidian/components/disposable-component

Disposable component base class and utilities for using declarations.

FunctionDescription
asDisposableComponentConvert component to a DisposableEx interface by adding Symbol.dispose and a convenience DisposableEx.dispose method that unloads the component when disposed. An existing Symbol.dispose is preserved; the convenience DisposableEx.dispose method always delegates to it. The passed component is mutated in place and returned, so the call is idempotent.