Understanding the Use of `filterOrElse` in TypeScript Code Example
I guess I missed the point of
Where
I would have expected the
Am I supposed to use
Like this is doing what I want but fils unadapted:
filterOrElse or I am misusing it. I have something like:Where
maybeReconcileMollieCustomerBySlugifiedName returns Effect.Effect<{id: string | null}, ..., ...> and createMollieCustomer returns Effect.Effect<{id: string}, ..., ...>I would have expected the
filterOrElse method to be able to strip the null from the inferred return type. But it's not the case.Am I supposed to use
Effect.if and return the value with a non-null assertion ? Like this is doing what I want but fils unadapted:
