Handling Conditional Operations on Arrays with `Effect.forEach`

My previous question comes from following problem. I do a bunch of conditional operations on an array of reviews utilizing Effect.forEach. Some conditions just annotate the current span with Effect.annotateCurrentSpan, while other conditions produce new values Effect.succeed<{isPositive: boolean, qualityID: string, reviewID: string}>. As a result I'm getting an array of type (void | {isPositive: boolean, qualityID: string, reviewID: string})[]. Since the annotateCurrentSpan implicitly returns null, I could utilize isNotNull predicate but it won't change the runtime type situation. How can I get rid of the void coming from Effect.forEach?
Was this page helpful?