.setFailureType(to: Error.self)

Updated
Sep 19, 2019 2:01 PM
Created
Sep 19, 2019 2:00 PM
Tags
SwiftCombine.Framework
Keywords

How can I convert a Just<T> to an AnyPublisher<T, Error>?

Just(x)
    .setFailureType(Error.self)
    .eraseToAnyPublisher()