Search code examples
xcodecombinepublisher

How to check the current publisher type in Xcode?


After putting some operators on a publisher I am curious as to what the current return value and/or error is. Is there a quick way in Xcode that you can check that?

I would like to see something like Map<CombineLatest<Published<String>, Published<String>, String?>>.

I know I don't need to know if I erase it with .eraseToAnyPublisher, but I like to check.


Solution

  • An easy way is to insert the line

    .map{$0}
    

    – which practically does nothing – and ⌥-click on $0