Skip to content

Commit

Permalink
Apply changes from ktLintFormat
Browse files Browse the repository at this point in the history
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
rjrjr authored and github-actions[bot] committed Sep 25, 2024
1 parent 10f5ef7 commit 7071aa5
Showing 1 changed file with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public interface BaseRenderContext<out PropsT, StateT, in OutputT> {
public fun <E1, E2, E3, E4, E5, E6, E7, E8, E9> eventHandler(
name: () -> String = { "eventHandler" },
update: WorkflowAction<@UnsafeVariance PropsT, StateT, @UnsafeVariance OutputT>
.Updater.(E1, E2, E3, E4, E5, E6, E7, E8, E9) -> Unit
.Updater.(E1, E2, E3, E4, E5, E6, E7, E8, E9) -> Unit
): (E1, E2, E3, E4, E5, E6, E7, E8, E9) -> Unit {
return { e1, e2, e3, e4, e5, e6, e7, e8, e9 ->
actionSink.send(action(name) { update(e1, e2, e3, e4, e5, e6, e7, e8, e9) })
Expand All @@ -313,7 +313,7 @@ public interface BaseRenderContext<out PropsT, StateT, in OutputT> {
public fun <E1, E2, E3, E4, E5, E6, E7, E8, E9, E10> eventHandler(
name: () -> String = { "eventHandler" },
update: WorkflowAction<@UnsafeVariance PropsT, StateT, @UnsafeVariance OutputT>
.Updater.(E1, E2, E3, E4, E5, E6, E7, E8, E9, E10) -> Unit
.Updater.(E1, E2, E3, E4, E5, E6, E7, E8, E9, E10) -> Unit
): (E1, E2, E3, E4, E5, E6, E7, E8, E9, E10) -> Unit {
return { e1, e2, e3, e4, e5, e6, e7, e8, e9, e10 ->
actionSink.send(action(name) { update(e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) })
Expand All @@ -326,30 +326,30 @@ public interface BaseRenderContext<out PropsT, StateT, in OutputT> {
*/
public fun <PropsT, StateT, OutputT, ChildOutputT, ChildRenderingT>
BaseRenderContext<PropsT, StateT, OutputT>.renderChild(
child: Workflow<Unit, ChildOutputT, ChildRenderingT>,
key: String = "",
handler: (ChildOutputT) -> WorkflowAction<PropsT, StateT, OutputT>
): ChildRenderingT = renderChild(child, Unit, key, handler)
child: Workflow<Unit, ChildOutputT, ChildRenderingT>,
key: String = "",
handler: (ChildOutputT) -> WorkflowAction<PropsT, StateT, OutputT>
): ChildRenderingT = renderChild(child, Unit, key, handler)

/**
* Convenience alias of [BaseRenderContext.renderChild] for workflows that don't emit output.
*/
public fun <PropsT, ChildPropsT, StateT, OutputT, ChildRenderingT>
BaseRenderContext<PropsT, StateT, OutputT>.renderChild(
child: Workflow<ChildPropsT, Nothing, ChildRenderingT>,
props: ChildPropsT,
key: String = ""
): ChildRenderingT = renderChild(child, props, key) { noAction() }
child: Workflow<ChildPropsT, Nothing, ChildRenderingT>,
props: ChildPropsT,
key: String = ""
): ChildRenderingT = renderChild(child, props, key) { noAction() }

/**
* Convenience alias of [BaseRenderContext.renderChild] for children that don't take props or emit
* output.
*/
public fun <PropsT, StateT, OutputT, ChildRenderingT>
BaseRenderContext<PropsT, StateT, OutputT>.renderChild(
child: Workflow<Unit, Nothing, ChildRenderingT>,
key: String = ""
): ChildRenderingT = renderChild(child, Unit, key) { noAction() }
child: Workflow<Unit, Nothing, ChildRenderingT>,
key: String = ""
): ChildRenderingT = renderChild(child, Unit, key) { noAction() }

/**
* Ensures a [LifecycleWorker] is running. Since [worker] can't emit anything,
Expand All @@ -362,9 +362,9 @@ public fun <PropsT, StateT, OutputT, ChildRenderingT>
*/
public inline fun <reified W : LifecycleWorker, PropsT, StateT, OutputT>
BaseRenderContext<PropsT, StateT, OutputT>.runningWorker(
worker: W,
key: String = ""
) {
worker: W,
key: String = ""
) {
runningWorker(worker, key) {
// The compiler thinks this code is unreachable, and it is correct. But we have to pass a lambda
// here so we might as well check at runtime as well.
Expand All @@ -387,9 +387,9 @@ public inline fun <reified W : LifecycleWorker, PropsT, StateT, OutputT>
)
public inline fun <reified W : Worker<Nothing>, PropsT, StateT, OutputT>
BaseRenderContext<PropsT, StateT, OutputT>.runningWorker(
worker: W,
key: String = ""
) {
worker: W,
key: String = ""
) {
runningWorker(worker, key) {
// The compiler thinks this code is unreachable, and it is correct. But we have to pass a lambda
// here so we might as well check at runtime as well.
Expand Down Expand Up @@ -417,10 +417,10 @@ public inline fun <reified W : Worker<Nothing>, PropsT, StateT, OutputT>
*/
public inline fun <T, reified W : Worker<T>, PropsT, StateT, OutputT>
BaseRenderContext<PropsT, StateT, OutputT>.runningWorker(
worker: W,
key: String = "",
noinline handler: (T) -> WorkflowAction<PropsT, StateT, OutputT>
) {
worker: W,
key: String = "",
noinline handler: (T) -> WorkflowAction<PropsT, StateT, OutputT>
) {
runningWorker(worker, typeOf<W>(), key, handler)
}

Expand All @@ -435,11 +435,11 @@ public inline fun <T, reified W : Worker<T>, PropsT, StateT, OutputT>
@PublishedApi
internal fun <T, PropsT, StateT, OutputT>
BaseRenderContext<PropsT, StateT, OutputT>.runningWorker(
worker: Worker<T>,
workerType: KType,
key: String = "",
handler: (T) -> WorkflowAction<PropsT, StateT, OutputT>
) {
worker: Worker<T>,
workerType: KType,
key: String = "",
handler: (T) -> WorkflowAction<PropsT, StateT, OutputT>
) {
val workerWorkflow = WorkerWorkflow<T>(workerType, key)
renderChild(workerWorkflow, props = worker, key = key, handler = handler)
}

0 comments on commit 7071aa5

Please sign in to comment.