Skip to content

Instantly share code, notes, and snippets.

@ayoung4
ayoung4 / effect-in-layer.ts
Created April 29, 2021 19:23
trying to understand how to run an effect in the background, provided as a layer to another program
import * as F from '@effect-ts/core/Effect/Fiber'
import * as L from '@effect-ts/core/Effect/Layer'
import * as M from '@effect-ts/core/Effect/Managed'
import * as T from '@effect-ts/core/Effect'
import { pipe } from '@effect-ts/core/Function'
import { tag } from '@effect-ts/core/Has'
import { testRuntime } from '@effect-ts/jest/Runtime'
describe('run an effect forever in the background and stop when the test is done', () => {