Skip to content

Commit 7380d83

Browse files
committed
update
1 parent 640f9e1 commit 7380d83

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Sources/async-task/protocol/IAsyncTask.swift

+6
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ public protocol IAsyncTask: AnyObject, Sendable {
5151
/// If not provided, errors will not be automatically transformed.
5252
var errorMapper: Async.ErrorMapper<ErrorType>? { get }
5353

54+
/// Initializer
55+
///
56+
/// - Parameter errorMapper: A closure for custom error handling, allowing transformation of
57+
/// errors into the specified error type `E`. Defaults to `nil`.
58+
init(errorMapper: Async.ErrorMapper<ErrorType>?)
59+
5460
// MARK: - Methods
5561

5662
/// Cancels the currently running task, if any.

Sources/async-task/task/ObservableSingleTask.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ extension Async {
4949
/// - Parameter errorMapper: A closure for custom error handling, allowing transformation of
5050
/// errors into the specified error type `E`. Defaults to `nil`.
5151
public init(
52-
errorMapper: ErrorMapper<E>? = nil
52+
errorMapper: Async.ErrorMapper<ErrorType>? = nil
5353
) {
5454
self.errorMapper = errorMapper
5555
}

0 commit comments

Comments
 (0)