Effect CommunityEC
Effect Community2mo ago
2 replies
Kam

Understanding Type Behavior with Effect.Effect<void> vs. void

Is there any reason why there is no type error on testFn1 and testFn2?
It seems I can return any type of Effect in a function that is supposed to have return type Effect.Effect<void>, while I expectedly can only return
undefined
in a function with return type
void
.

Is there a reason for that?
image.png
Was this page helpful?