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

Function respondWithDefect

packages/cluster/test/Runners.test.ts:191–194  ·  view source on GitHub ↗
(
    request: FromClientEncoded,
    write: (data: FromServerEncoded) => Effect.Effect<void>
  )

Source from the content-addressed store, hash-verified

189 )
190
191 const respondWithDefect = (
192 request: FromClientEncoded,
193 write: (data: FromServerEncoded) => Effect.Effect<void>
194 ) => request._tag === "Request" ? write({ _tag: "Defect", defect: "boom" }) : Effect.void
195
196 it.effect("a server-delivered defect resolves a volatile request", () =>
197 Effect.gen(function*() {

Callers

nothing calls this directly

Calls 1

writeFunction · 0.50

Tested by

no test coverage detected