Effect CommunityEC
Effect Community9mo ago
3 replies
Devin

Linter rule to avoid side effects in Effect.gen blocks? Or better yet, compiler error?

Example:
Effect.gen(function* () {
  yield* Effect.sync(() => { // <-- lifted side effect
    sideEffect()
  })
})

// vs.

Effect.gen(function* () {
  sideEffect() // <-- should not be allowed, I think?
})
Was this page helpful?