I'm not quite sure how that would work under the hood, but if this particular API could be fixed that'd be nice!
I think this depends on any AsyncSequence<Element> throws/nothrows
(or AnyAsyncSequence/AnyThrowingAsyncSequence
) to be viable. Adding a generic per async sequence dependency to each view and view model becomes quickly untenable.
FWIW I've defined a helper that effectively uses Async(Throwing)Stream
as type-erasers given an async sequence, so converting Notification.Notifications
is a one-liner at least. It's just not as safe as it could be since the @rethrows
effect can't be tracked right now.