Skip to content

Commit 5f489d4

Browse files
committed
export EventId & vEventId
1 parent f037353 commit 5f489d4

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

example/convex/passingSignals.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
import { vWorkflowId, WorkflowManager } from "@convex-dev/workflow";
1+
import {
2+
EventId,
3+
vEventId,
4+
vWorkflowId,
5+
WorkflowManager,
6+
} from "@convex-dev/workflow";
27
import { components, internal } from "./_generated/api";
38
import { internalMutation } from "./_generated/server";
4-
import { vEventId } from "../../src/types";
59

610
const workflow = new WorkflowManager(components.workflow);
711

@@ -23,7 +27,7 @@ export const signalBasedWorkflow = workflow.define({
2327

2428
export const createSignal = internalMutation({
2529
args: { workflowId: vWorkflowId },
26-
handler: async (ctx, args) => {
30+
handler: async (ctx, args): Promise<EventId> => {
2731
const eventId = await workflow.createEvent(ctx, {
2832
name: "signal",
2933
workflowId: args.workflowId,

src/client/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ import type { WorkflowCtx } from "./workflowContext.js";
3636
import { workflowMutation } from "./workflowMutation.js";
3737

3838
export {
39+
vEventId,
3940
vWorkflowId,
4041
vWorkflowStep,
42+
type EventId,
4143
type WorkflowId,
4244
type WorkflowStep,
4345
} from "../types.js";

0 commit comments

Comments
 (0)