メインコンテンツまでスキップ
バージョン: v2 Next 🚧

クラス: StoreRegistry

定義: src/component/StoreRegistry.ts:39

クライアントが持つ全コンポーネントストアの集合。

コア種別(services / commands / listeners / preconditions)は クライアント自身が登録し、追加のストアはプラグインが install 時に 登録します。

実装​

メソッド​

[iterator]()​

iterator: Iterator<ComponentStore<Component>>;

定義: src/component/StoreRegistry.ts:103

戻り値​

Iterator<ComponentStore<Component>>

の実装​

Iterable.[iterator]

get()​

コールシグネチャ​

get<K>(name): Stores[K];

定義: src/component/StoreRegistry.ts:62

ストアを名前で取得します。Stores インターフェースにより型付けされます。

型パラメーター​
K​

K extends keyof Stores

パラメータ​
name​

K

戻り値​

Stores[K]

コールシグネチャ​

get(name):
| ComponentStore<Component>
| undefined;

定義: src/component/StoreRegistry.ts:63

ストアを名前で取得します。Stores インターフェースにより型付けされます。

パラメータ​
name​

string

戻り値​

| ComponentStore<Component> | undefined


loadAll()​

loadAll(baseDirectory): Promise<void>;

定義: src/component/StoreRegistry.ts:90

すべてのストアを登録順に順次ロードします。ロード時のイベントと失敗を 決定的にするためです。

パラメータ​

baseDirectory​

string | null

戻り値​

Promise<void>


register()​

register(store): this;

定義: src/component/StoreRegistry.ts:49

ストアを登録します。クライアントのロード前に行ってください(プラグインの install で間に合います)。

パラメータ​

store​

ComponentStore<Component>

戻り値​

this


resolve()​

resolve(cls): ComponentStore<Component>;

定義: src/component/StoreRegistry.ts:72

コンポーネントクラスの担当ストアをプロトタイプチェーンから解決します。 基底クラスが入れ子の場合は、より具体的なストアが優先されます。

パラメータ​

cls​

ComponentClass<Component>

戻り値​

ComponentStore<Component>


unloadAll()​

unloadAll(): Promise<void>;

定義: src/component/StoreRegistry.ts:97

すべてのストアのコンポーネントを登録の逆順にアンロードします。

戻り値​

Promise<void>