You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add comprehensive JSDoc annotations to the Workflow subsystem — both the client (for managing workflow instances) and the runtime (for defining workflows and activities).
All option types: Document every property with defaults and constraints
Add @example blocks showing common patterns (start → wait → get result)
Example
/** * Schedules an activity for execution and returns a task representing * the pending result. * * Activities are the basic unit of work in a workflow — they execute * exactly once (with at-least-once delivery) and can perform I/O, * call external services, and interact with Dapr building blocks. * * @param activity - The activity function or its registered name * @param input - Input data passed to the activity; must be JSON-serializable * @returns A task that resolves with the activity's return value * * @example * ```ts * function* myWorkflow(ctx: WorkflowContext) { * const result = yield ctx.callActivity(processPayment, { orderId: "123", amount: 49.99 }); * return result; * } * ``` */callActivity<TInput,TOutput>(activity: Activity<TInput,TOutput>,input?: TInput): Task<TOutput>;
Acceptance Criteria
All workflow client and runtime classes fully annotated
Orchestration context primitives documented with usage examples
Summary
Add comprehensive JSDoc annotations to the Workflow subsystem — both the client (for managing workflow instances) and the runtime (for defining workflows and activities).
Scope
Workflow Client (
src/workflow/client/)DaprWorkflowClient.tsWorkflowState.tsWorkflowFailureDetails.tsWorkflow Runtime (
src/workflow/runtime/)WorkflowRuntime.tsWorkflowContext.tsWorkflowActivityContext.tsWorkflowRuntimeStatus.tsWorkflow Types (
src/types/workflow/)Activity.type.ts— Activity function signatureWorkflow.type.ts— Workflow orchestrator function signatureWorkflowClientOption.ts— Client constructor optionsWorkflowGetResponse.type.ts— Response from get operationsWorkflowRaiseOptions.type.ts— Options for raising eventsWorkflowRuntimeStatus.type.ts— Status enum typeWorkflowStartOptions.type.ts— Options for starting workflowsInputOutput.type.ts— Generic I/O type helpersRequirements
DaprWorkflowClient: Document every method (start,get,pause,resume,terminate,purge,raise,wait)WorkflowRuntime: DocumentregisterWorkflow,registerActivity,start,shutdownWorkflowContext: Document all orchestration primitives:callActivity— scheduling activitiescallChildWorkflow— sub-orchestrationscreateTimer— durable timerswaitForExternalEvent— external event correlationcontinueAsNew— eternal workflowswhenAll/whenAny— fan-out/fan-in patternsWorkflowActivityContext: Document what's available inside activitiesWorkflowState: Document all properties (instanceId,name,runtimeStatus,input,output,createdAt,lastUpdatedAt)@exampleblocks showing common patterns (start → wait → get result)Example
Acceptance Criteria