-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
Multiple files in the workflows reference use event.params to access workflow event data, but the actual WorkflowEvent<T> type from cloudflare:workers uses event.payload.
From the runtime type definition:
export type WorkflowEvent<T> = {
payload: Readonly<T>;
timestamp: Date;
instanceId: string;
};Affected files (non-exhaustive):
references/workflows/api.md— e.g.event.params.paymentMethod,event.params.userIdreferences/workflows/patterns.md— e.g.event.params.imageKey,event.params.email,event.params.sourceUrlreferences/workflows/gotchas.md— best practices mentionevent.payloadin one place but the rest of the docs consistently useevent.params
All instances of event.params in workflow code examples should be event.payload.
Source: cloudflare:workers type definitions and https://developers.cloudflare.com/workflows/build/events-and-parameters/
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels