@asaidimu/utils-artifacts 4.1.0 → 4.1.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.
- package/index.d.mts +11 -10
- package/index.d.ts +11 -10
- package/package.json +1 -1
package/index.d.mts
CHANGED
|
@@ -352,16 +352,17 @@ interface ArtifactFactoryContext<TRegistry extends Record<string, any>, TState e
|
|
|
352
352
|
*/
|
|
353
353
|
onDispose(callback: ArtifactCleanup): void;
|
|
354
354
|
/**
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
stream(callback: (ctx: ArtifactStreamContext<TState, TArtifact>) => void | Promise<void> | (() =>
|
|
355
|
+
* Starts a streaming process for a Singleton artifact.
|
|
356
|
+
* The callback receives an `ArtifactStreamContext` to emit values and manage the
|
|
357
|
+
* stream's lifecycle. It can return a cleanup function (or a Promise resolving
|
|
358
|
+
* to one) to handle resource disposal.
|
|
359
|
+
* * @param callback - The streaming logic implementation. Can be synchronous or
|
|
360
|
+
* asynchronous, optionally returning a cleanup function.
|
|
361
|
+
* @throws {SystemError} If called on a Transient artifact, as they do not
|
|
362
|
+
* support persistent streaming states.
|
|
363
|
+
*/
|
|
364
|
+
stream(callback: (ctx: ArtifactStreamContext<TState, TArtifact>) => (void | (() => void | Promise<void>)) | Promise<void | (() => void | Promise<void>)>): void;
|
|
365
|
+
stream(callback: (ctx: ArtifactStreamContext<TState, TArtifact>) => (void | (() => (void | Promise<void>))) | Promise<(void | (() => (void | Promise<void>)))>): void;
|
|
365
366
|
}
|
|
366
367
|
/**
|
|
367
368
|
* A function that performs cleanup or disposal logic for an artifact, potentially asynchronously.
|
package/index.d.ts
CHANGED
|
@@ -352,16 +352,17 @@ interface ArtifactFactoryContext<TRegistry extends Record<string, any>, TState e
|
|
|
352
352
|
*/
|
|
353
353
|
onDispose(callback: ArtifactCleanup): void;
|
|
354
354
|
/**
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
stream(callback: (ctx: ArtifactStreamContext<TState, TArtifact>) => void | Promise<void> | (() =>
|
|
355
|
+
* Starts a streaming process for a Singleton artifact.
|
|
356
|
+
* The callback receives an `ArtifactStreamContext` to emit values and manage the
|
|
357
|
+
* stream's lifecycle. It can return a cleanup function (or a Promise resolving
|
|
358
|
+
* to one) to handle resource disposal.
|
|
359
|
+
* * @param callback - The streaming logic implementation. Can be synchronous or
|
|
360
|
+
* asynchronous, optionally returning a cleanup function.
|
|
361
|
+
* @throws {SystemError} If called on a Transient artifact, as they do not
|
|
362
|
+
* support persistent streaming states.
|
|
363
|
+
*/
|
|
364
|
+
stream(callback: (ctx: ArtifactStreamContext<TState, TArtifact>) => (void | (() => void | Promise<void>)) | Promise<void | (() => void | Promise<void>)>): void;
|
|
365
|
+
stream(callback: (ctx: ArtifactStreamContext<TState, TArtifact>) => (void | (() => (void | Promise<void>))) | Promise<(void | (() => (void | Promise<void>)))>): void;
|
|
365
366
|
}
|
|
366
367
|
/**
|
|
367
368
|
* A function that performs cleanup or disposal logic for an artifact, potentially asynchronously.
|