Effect CommunityEC
Effect Community3y ago
14 replies
tobiaslins

Dynamically Providing a Layer to a Program

Hey! Whats the best way to dynamically provide a layer to my program? (eg from a boolean)
const runnable = program.pipe(
  Effect.provide(FileSystem.layer),
  Effect.provide(Logger.add(debugModeLogger)) // I want to provide this logger if something is true
)
Was this page helpful?