Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
renetik committed Jun 21, 2024
1 parent a6857dd commit 5236698
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,16 @@ interface CSHasChangeValue<T> : CSValue<T>, CSHasChange<T> {
onAction(item1.value, item2.value)
}

//TODO remove this Pair and use normal as this is unnecessary elswhewer why here.
inline fun <Argument1, Argument2>
Pair<CSHasChangeValue<Argument1>, CSHasChangeValue<Argument2>>.action(
crossinline onAction: (Pair<Argument1, Argument2>) -> Unit,
): CSRegistration = action(first, second) { first, second -> onAction(first to second) }
crossinline onAction: (Argument1, Argument2) -> Unit,
): CSRegistration = action(first, second) { first, second -> onAction(first, second) }


inline fun <Argument1, Argument2>
Pair<CSHasChangeValue<Argument1>, CSHasChangeValue<Argument2>>.action(
crossinline onAction: () -> Unit,
): CSRegistration = action(first, second) { _, _ -> onAction() }


fun <Argument1, Argument2, Argument3, Return>
Expand Down

0 comments on commit 5236698

Please sign in to comment.