any specific detail on what type of exception it would throw? since catch all is fine, but what if t
any specific detail on what type of exception it would throw? since catch all is fine, but what if the exception was a different reason
Promise<InstanceStatus>

object[] instead of object;workflow.get(id).stop()) instead of terminate as a means to softly shutdown the workflow. So the user could gracefully close the workflow (for example the workflow could be a long running polling workflow that doesn't have an end state).terminate() to kill the workflow and abruptly kill the workflow in case it's stuck in a inf-loop and we want to kill it for sure.terminate is the only way to stop a long running / no end-state workflow, so it would be nice to gracefully or signal the workflow to transition to a potential end-state or cleanup.status() method (which should be fine for now) or set some outside state from inside the step callback (seems like a code smell).Maximum steps per Workflow 256, does this mean only for Workers Free? what about the limitation for Workers PaidWorkflowEvent<T> to change; the workflow would accept the original WorkflowEvent as some of sort constructor (so it could be accessed via this.initEvent etc; then the arguments in the run indicates a modified arguments that the workflow can compare to; a change of value can indicate a signalWorkflowEvent<T> to have signal property, this property has special value that could be checked and changed unlike payload indicating the original value; the signal property can have built-in signals like shouldStop to indicate a built-in option for the workflow to be informed that it should gracefully transition into a stop or cancelled state with proper clean up.WorkflowStepConfig can accept a option to overrideResult; this may be harder to implement then the second porposal.step.sleep
unknown is correct - you pass your own type: https://developers.cloudflare.com/workflows/build/workers-api/#workflowinstancecreateoptions
create({params: YourType}) is the payload property of WorkflowEvent. as doesn’t tell Workflows anything.WorkflowEvent by passing your type as the type parameter as per the docs I linked.
params property in the create call doesn't propagate through to WorkflowEvent because there is a serialization step in the middle.as isn't a validation either: it casts to that type. If you need to validate the params, use something like zodparams property doesn't propagate type information anywhere, because the create call doesn't return anything about your params.d458dbe698b8eef41837f941d73bc5b3 is mine.Uncaught SyntaxError: The requested module 'cloudflare:workers' does not provide an export named 'WorkflowStep'uhm, did I break something...?
Promise<InstanceStatus>object[]workflow.get(id).stop()terminate()terminate.status()Maximum steps per Workflow 256WorkflowEvent<T>WorkflowEvent<T>this.initEventrunsignalsignalpayloadpayloadshouldStopWorkflowStepConfigoverrideResultstep.sleepcreate({params: YourType})asasWorkflowEventWorkflowEventd458dbe698b8eef41837f941d73bc5b3