我有两个来自通知的信号。这些是从外部框架触发的。
let successSignal = NotificationCenter.default.reactive.notifications(forName: NSNotification.Name(rawValue: "someNotification"))
let failedSignal = NotificationCenter.default.reactive.notifications(forName: NSNotification.Name(rawValue: "someNotification"))
现在我想将它们组合成一个类型的信号Signal<Notification, Error>
。如果successSignal
火灾发送值,如果failedSinal
火灾发送错误。
我不知道如何管理这个。