I have an object named myObjectType, how do I convert myObjectType to AnyPublisher<myObjectType, Never> ?
func getDemoTest() -> AnyPublisher<myObjectType, Never> { return ????????? ///How do I convert the myObjectType to the AnyPublisher<myObjectType, Never> ? }
A simple way to create a one-time publisher is to use Just
Just(someObject).eraseToAnyPublisher()
1.4m articles
1.4m replys
5 comments
57.0k users