Skip to content

Commit

Permalink
Deprecates the name-optional flavor of StatelessWorkflow.action
Browse files Browse the repository at this point in the history
Missed a spot in #1226.
  • Loading branch information
rjrjr committed Nov 7, 2024
1 parent ae3046f commit 7973dbe
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,16 @@ public fun <RenderingT> Workflow.Companion.rendering(
rendering: RenderingT
): Workflow<Unit, Nothing, RenderingT> = stateless { rendering }


@Deprecated(
"Always provide a debugging name",
ReplaceWith("action(\"TODO: debugging name\", update)")
)
public fun <PropsT, OutputT, RenderingT>
StatelessWorkflow<PropsT, OutputT, RenderingT>.action(
update: WorkflowAction<PropsT, *, OutputT>.Updater.() -> Unit
): WorkflowAction<PropsT, Nothing, OutputT> = action("", update)

/**
* Convenience to create a [WorkflowAction] with parameter types matching those
* of the receiving [StatefulWorkflow]. The action will invoke the given [lambda][update]
Expand All @@ -123,7 +133,7 @@ public fun <RenderingT> Workflow.Companion.rendering(
*/
public fun <PropsT, OutputT, RenderingT>
StatelessWorkflow<PropsT, OutputT, RenderingT>.action(
name: String = "",
name: String,
update: WorkflowAction<PropsT, *, OutputT>.Updater.() -> Unit
): WorkflowAction<PropsT, Nothing, OutputT> = action({ name }, update)

Expand Down

0 comments on commit 7973dbe

Please sign in to comment.