Skip to content

Commit

Permalink
Fixed issue with error return type.
Browse files Browse the repository at this point in the history
  • Loading branch information
cloutiertyler committed Oct 16, 2016
1 parent a18efbc commit 82435b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Signal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ extension SignalType {
/// callback. Disposing of the Disposable will have no effect on the Signal
/// itself.
@discardableResult
public func onFailed(error: @escaping (Error) -> Void) -> Disposable? {
public func onFailed(error: @escaping (ErrorType) -> Void) -> Disposable? {
return add(observer: Observer(failed: error))
}

Expand All @@ -253,7 +253,7 @@ extension SignalType {
}

/// Maps errors in the signal to a new error.
public func mapError<F>(transform: @escaping (Error) -> F) -> Signal<Value, F> {
public func mapError<F>(transform: @escaping (ErrorType) -> F) -> Signal<Value, F> {
return Signal { observer in
return self.on { event -> Void in
observer.sendEvent(event.mapError(transform))
Expand Down

0 comments on commit 82435b9

Please sign in to comment.