MCPcopy Index your code
hub / github.com/Effect-TS/effect / alwaysFail

Function alwaysFail

packages/effect/test/Schedule.test.ts:850–852  ·  view source on GitHub ↗
(ref: Ref.Ref<number>)

Source from the content-addressed store, hash-verified

848 })
849}
850const alwaysFail = (ref: Ref.Ref<number>): Effect.Effect<number, string> => {
851 return Ref.updateAndGet(ref, (n) => n + 1).pipe(Effect.flatMap((n) => Effect.fail(`Error: ${n}`)))
852}
853const repeat = <Env, B>(schedule: Schedule.Schedule<B, number, Env>): Effect.Effect<B, never, Env> => {
854 return Ref.make(0).pipe(
855 Effect.flatMap((ref) => ref.pipe(Ref.updateAndGet((n) => n + 1), Effect.repeat(schedule)))

Callers 1

Schedule.test.tsFile · 0.85

Calls 2

pipeMethod · 0.65
failMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…