MCPcopy Create free account
hub / github.com/Effect-TS/effect / make

Function make

packages/effect/test/Effect.test.ts:724–735  ·  view source on GitHub ↗
(i: number)

Source from the content-addressed store, hash-verified

722 const started: Array<number> = []
723 const interrupted: Array<number> = []
724 const make = (i: number) =>
725 Effect.suspend(() => {
726 started.push(i)
727 return Effect.sleep(500)
728 }).pipe(
729 Effect.as(i),
730 Effect.onInterrupt(() =>
731 Effect.sync(() => {
732 interrupted.push(i)
733 })
734 )
735 )
736 const fiber = yield* Effect.all([
737 make(1),
738 Effect.fail("boom").pipe(Effect.delay(100)),

Callers 1

Effect.test.tsFile · 0.70

Calls 5

pushMethod · 0.80
onInterruptMethod · 0.80
pipeMethod · 0.65
sleepMethod · 0.65
syncMethod · 0.45

Tested by

no test coverage detected