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

Function callerExit

packages/effect/src/ui/Query.ts:4270–4277  ·  view source on GitHub ↗
(exit: Exit.Exit<any, any>)

Source from the content-addressed store, hash-verified

4268
4269/** What a caller of a fetch gets: a defect, the Fails only, or an interrupt for a revert. */
4270const callerExit = (exit: Exit.Exit<any, any>): Exit.Exit<any, any> =>
4271 exit._tag === "Success"
4272 ? exit
4273 : Cause.hasDies(exit.cause)
4274 ? Exit.failCause(diesOnly(exit.cause))
4275 : Cause.hasFails(exit.cause)
4276 ? Exit.failCause(failsOnly(exit.cause))
4277 : Exit.interrupt()
4278
4279const withWaiting = (result: Settled, waiting: boolean): Settled =>
4280 result.waiting === waiting

Callers 3

Query.tsFile · 0.85
onFetchExitFunction · 0.85
endSharedFunction · 0.85

Calls 3

diesOnlyFunction · 0.85
failsOnlyFunction · 0.85
interruptMethod · 0.45

Tested by

no test coverage detected