Skip to content

SharedComponentPoolComponentConstructorParams<TKey, TComponent>

Parameters of SharedComponentPoolComponent.

Import:

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

Signature:

export interface SharedComponentPoolComponentConstructorParams<TKey, TComponent extends Component>

Properties

PropertyTypeDescription
createComponent(key: TKey) => TComponentCreates the component shared under a key. Called once per key each time the key goes from no consumer to one; the pool loads the component itself, so the factory must return it unloaded.