Sharing Variables Across Nested Effects in TypeScript

Is there a way to share data between effects? Like for example, I have a dryRun variable, that I would like every sub effect to access without "drilling" the value

const service = (dryRun = false) => Effect.gen(function* () {
   yield* service2
})

const service2 = Effect.gen(function* () {
  yield* service3
})

const service3 = Effect.gen(function* () {
  // check if dryRun
})
Was this page helpful?