diff --git a/workflow-core/src/commonMain/kotlin/com/squareup/workflow1/StatelessWorkflow.kt b/workflow-core/src/commonMain/kotlin/com/squareup/workflow1/StatelessWorkflow.kt index 46c44f07d..91e68782d 100644 --- a/workflow-core/src/commonMain/kotlin/com/squareup/workflow1/StatelessWorkflow.kt +++ b/workflow-core/src/commonMain/kotlin/com/squareup/workflow1/StatelessWorkflow.kt @@ -113,6 +113,16 @@ public fun Workflow.Companion.rendering( rendering: RenderingT ): Workflow = stateless { rendering } + +@Deprecated( + "Always provide a debugging name", + ReplaceWith("action(\"TODO: debugging name\", update)") +) +public fun + StatelessWorkflow.action( + update: WorkflowAction.Updater.() -> Unit +): WorkflowAction = action("", update) + /** * Convenience to create a [WorkflowAction] with parameter types matching those * of the receiving [StatefulWorkflow]. The action will invoke the given [lambda][update] @@ -123,7 +133,7 @@ public fun Workflow.Companion.rendering( */ public fun StatelessWorkflow.action( - name: String = "", + name: String, update: WorkflowAction.Updater.() -> Unit ): WorkflowAction = action({ name }, update)