feat: Adds documentation and removes some unused code.

This commit is contained in:
2024-05-31 16:24:26 -04:00
parent dac5d932dd
commit ab915f88db
9 changed files with 542 additions and 382 deletions

View File

@@ -1,9 +1,20 @@
import ComposableArchitecture
/// An action type that exposes a `receive` method that accepts task result, generally from
/// calling external dependencies.
///
/// This allows for multiple receive actions to be nested under
/// one single action that handle the `failure` and `success` cases more conveniently
/// by using some of the higher order reducers provided by this package.
public protocol ReceiveAction<ReceiveAction> {
/// The success cases.
associatedtype 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 }
}