swift - How to combine 2 publishers and erase values to Void? - Stack Overflow

PHOTO EMBED

Sun Jun 05 2022 06:56:37 GMT+0000 (Coordinated Universal Time)

Saved by @leo #swift

var hasChangedPublisher: AnyPublisher<Void, Never> {
  preferences.publisher
    .merge(state.$permissionStatus)
    .map({ _ in
      return () // transform to Void
    })
    .eraseToAnyPublisher()
}
content_copyCOPY

https://stackoverflow.com/questions/62253436/how-to-combine-2-publishers-and-erase-values-to-void