How to implement assign(to:) for Catalina and friends?

How to implement

func assign(to published: inout Published<Self.Output>.Publisher)

for macOS 10.15 and friends? ( iOS 13, tvOS and watchOS )

I can't figure out an implementation. It replaces a publisher for a @Published property (which is nice and neat), but it seems impossible to do so without internal sacred magic (accessing internal/private properties/methods).

1 Like
Terms of Service

Privacy Policy

Cookie Policy