Generic Instance Method

combineLatest(_:_:)

Subscribes to an additional publisher and invokes a closure upon receiving output from either publisher.

Declaration

func combineLatest<P, T>(_ other: P, _ transform: @escaping (Output, P.Output) -> T) -> Publishers.Map<Publishers.CombineLatest<AnyPublisher<Output, Failure>, P>, T> where P : Publisher, Self.Failure == P.Failure

Parameters

other

Another publisher to combine with this one.

transform

A closure that receives the most recent value from each publisher and returns a new value to publish.

Return Value

A publisher that receives and combines elements from this and another publisher.