@asaidimu/utils-artifacts 7.0.0 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.d.mts +12 -0
  2. package/index.d.ts +12 -0
  3. package/package.json +1 -1
package/index.d.mts CHANGED
@@ -167,6 +167,18 @@ interface DataStore<T extends object> {
167
167
  * Checks whether the store is fully initialized and ready for use.
168
168
  */
169
169
  isReady(): boolean;
170
+ /**
171
+ * Returns a promise that resolves once the store is fully initialised.
172
+ * Safe to call multiple times — all callers share the same latch.
173
+ *
174
+ * @param timeout - Optional maximum wait time in milliseconds.
175
+ * @throws {TimeoutError} If the store does not become ready within the timeout.
176
+ *
177
+ * @example
178
+ * await store.ready();
179
+ * const state = store.get();
180
+ */
181
+ ready(timeout?: number): Promise<void>;
170
182
  /**
171
183
  * Returns a readonly snapshot of the current execution state of the store.
172
184
  */
package/index.d.ts CHANGED
@@ -167,6 +167,18 @@ interface DataStore<T extends object> {
167
167
  * Checks whether the store is fully initialized and ready for use.
168
168
  */
169
169
  isReady(): boolean;
170
+ /**
171
+ * Returns a promise that resolves once the store is fully initialised.
172
+ * Safe to call multiple times — all callers share the same latch.
173
+ *
174
+ * @param timeout - Optional maximum wait time in milliseconds.
175
+ * @throws {TimeoutError} If the store does not become ready within the timeout.
176
+ *
177
+ * @example
178
+ * await store.ready();
179
+ * const state = store.get();
180
+ */
181
+ ready(timeout?: number): Promise<void>;
170
182
  /**
171
183
  * Returns a readonly snapshot of the current execution state of the store.
172
184
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asaidimu/utils-artifacts",
3
- "version": "7.0.0",
3
+ "version": "7.0.1",
4
4
  "description": "Reactive artifact container.",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",