Skip to content

Commit

Permalink
Deprecating eventCallback function. (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
Laimiux committed Mar 22, 2022
1 parent 01f778d commit 059425a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions formula/src/main/java/com/instacart/formula/FormulaContext.kt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ abstract class FormulaContext<out Input, State> internal constructor(
*
* It uses [transition] type as key.
*/
@Deprecated("Use context.onEvent {} instead.", replaceWith = ReplaceWith("onEvent(transition)"))
fun <Event> eventCallback(
transition: Transition<Input, State, Event>,
): Listener<Event> {
Expand All @@ -83,6 +84,7 @@ abstract class FormulaContext<out Input, State> internal constructor(
*
* @param key key with which the listener is to be associated. Same key cannot be used for multiple listeners.
*/
@Deprecated("Use context.onEvent(key) {} instead.", replaceWith = ReplaceWith("onEvent(key, transition)"))
fun <Event> eventCallback(
key: Any,
transition: Transition<Input, State, Event>,
Expand Down

0 comments on commit 059425a

Please sign in to comment.