Replies: 1 comment 1 reply
-
@lucamegh Definitely an interesting topic! We've experimented with value endpoints on dependencies in the past (and a few still exist in our isowords app), but we've found more flexibility (and consistency) in preferring closures. For example, we'd probably define your endpoint as: var authenticationState: () -> CurrentValuePublisher<AuthenticationState, Never> And this would allow you to use If you prefer, you can still define static endpoints on types that have "unimplemented" instances. For example you could define something like But as for defining |
Beta Was this translation helpful? Give feedback.
-
How about adding an
XCTUnimplemented
overload that returns aResult
instead of a(Parameters) -> Result
? This way we would be able to create unimplemented instances of dependencies built from non-function values (usually reference types).Beta Was this translation helpful? Give feedback.
All reactions