We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fde415 commit bd322d1Copy full SHA for bd322d1
lib/src/commonMain/kotlin/org/reduxkotlin/Thunk.kt
@@ -1,7 +1,8 @@
1
package org.reduxkotlin
2
3
typealias Thunk = (Dispatcher, GetState, Any?) -> Any
4
-fun createThunkMiddleware(extraArgument: Any? = null): Middleware =
+typealias ThunkMiddleware = Middleware
5
+fun createThunkMiddleware(extraArgument: Any? = null): ThunkMiddleware =
6
{ store ->
7
{ next: Dispatcher ->
8
{ action: Any ->
@@ -19,3 +20,5 @@ fun createThunkMiddleware(extraArgument: Any? = null): Middleware =
19
20
}
21
22
val thunk = createThunkMiddleware()
23
+
24
+fun ThunkMiddleware.withExtraArgument(arg: Any?) = createThunkMiddleware(arg)
0 commit comments