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

Function flipCauseOption

packages/effect/src/internal/cause.ts:261–269  ·  view source on GitHub ↗
(self: Cause.Cause<Option.Option<E>>)

Source from the content-addressed store, hash-verified

259
260/** @internal */
261export const flipCauseOption = <E>(self: Cause.Cause<Option.Option<E>>): Option.Option<Cause.Cause<E>> =>
262 match(self, {
263 onEmpty: Option.some<Cause.Cause<E>>(empty),
264 onFail: Option.map(fail),
265 onDie: (defect) => Option.some(die(defect)),
266 onInterrupt: (fiberId) => Option.some(interrupt(fiberId)),
267 onSequential: Option.mergeWith(sequential),
268 onParallel: Option.mergeWith(parallel)
269 })
270
271/** @internal */
272export const interruptOption = <E>(self: Cause.Cause<E>): Option.Option<FiberId.FiberId> =>

Callers

nothing calls this directly

Calls 4

matchFunction · 0.70
dieFunction · 0.70
interruptFunction · 0.70
mapMethod · 0.65

Tested by

no test coverage detected