feat: Adds onFailure reducer.

This commit is contained in:
2024-05-31 17:40:03 -04:00
parent ab915f88db
commit 36fe70c688
6 changed files with 153 additions and 142 deletions

View File

@@ -14,13 +14,5 @@ public protocol ReceiveAction<ReceiveAction> {
/// The root receive case that is used to handle the results.
static func receive(_ result: TaskResult<ReceiveAction>) -> Self
/// Extracts the result from the action.
var result: TaskResult<ReceiveAction>? { get }
}
extension ReceiveAction {
public var result: TaskResult<ReceiveAction>? {
AnyCasePath(unsafe: Self.receive).extract(from: self)
}
}