Skip to content

Commit 75964e7

Browse files
author
Malcolm Jarvis
authored
Merge pull request #13 from ReSwift/mjarvis/migration
Adds typealias & function forwards for compatibility with users upgrading from https://github.com/mikecole20/ReSwiftThunk
2 parents 0ccc8ab + ab81d35 commit 75964e7

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

ReSwift-Thunk/Thunk.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ public struct Thunk<State>: Action {
1717
self.body = body
1818
}
1919
}
20+
21+
@available(*, deprecated, renamed: "Thunk")
22+
typealias ThunkAction = Thunk

ReSwift-Thunk/createThunksMiddleware.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,10 @@ public func createThunksMiddleware<State>() -> Middleware<State> {
2323
}
2424
}
2525
}
26+
27+
// swiftlint:disable identifier_name
28+
@available(*, deprecated, renamed: "createThunksMiddleware")
29+
func ThunkMiddleware<State: StateType>() -> Middleware<State> {
30+
return createThunksMiddleware()
31+
}
32+
// swiftlint:enable identifier_name

0 commit comments

Comments
 (0)