@pogodisco/zephyr 1.1.0 → 1.2.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/dist/types.d.ts +2 -0
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createWorkflow } from "./workflow-composer.js";
|
|
1
2
|
export type Action<I = any, O = any> = (args: I) => Promise<O>;
|
|
2
3
|
export interface ActionRegistry {
|
|
3
4
|
[key: string]: Action;
|
|
@@ -22,3 +23,4 @@ export type WorkflowMiddleware<Reg extends ActionRegistry = any> = {
|
|
|
22
23
|
frame: ExecutionFrame;
|
|
23
24
|
}, next: () => Promise<any>): Promise<any>;
|
|
24
25
|
};
|
|
26
|
+
export type WF<Reg extends ActionRegistry, Context extends Record<string, any>> = ReturnType<typeof createWorkflow<Reg, Context>>;
|