Transforms all elements from the upstream publisher with a provided error-throwing closure.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
A closure that takes one element as its parameter and returns a new element.
A publisher that uses the provided closure to map elements from the upstream publisher to new elements that it then publishes.
transform closure throws an error, the publisher fails with the thrown error.