Skip to content

SharedComponentPoolComponentAcquireOptions

Options of SharedComponentPoolComponent.acquire.

Import:

import type { SharedComponentPoolComponentAcquireOptions } from '@mnaoumov/obsidian-lib/components/shared-component-pool-component';

Signature:

export interface SharedComponentPoolComponentAcquireOptions

Properties

PropertyTypeDescription
abortSignal?AbortSignalCancels the acquisition while the shared component is still loading. An abort after the acquisition resolved does nothing; release the acquisition instead.
consumer?ComponentA component whose unload releases the acquisition automatically.

The link is a child component added to the consumer, so it follows Obsidian's own rules: a consumer that is not loaded yet starts holding the link when it loads, and a ComponentEx consumer that is already unloaded refuses it with a SilentError. Releasing the acquisition by hand removes the link again, so a long-lived consumer that acquires and releases many times accumulates nothing.