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

Function keepDefectsAndElectFailures

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

Source from the content-addressed store, hash-verified

288
289/** @internal */
290export const keepDefectsAndElectFailures = <E>(self: Cause.Cause<E>): Option.Option<Cause.Cause<never>> =>
291 match(self, {
292 onEmpty: Option.none(),
293 onFail: (failure) => Option.some(die(failure)),
294 onDie: (defect) => Option.some(die(defect)),
295 onInterrupt: () => Option.none(),
296 onSequential: Option.mergeWith(sequential),
297 onParallel: Option.mergeWith(parallel)
298 })
299
300/** @internal */
301export const linearize = <E>(self: Cause.Cause<E>): HashSet.HashSet<Cause.Cause<E>> =>

Callers

nothing calls this directly

Calls 2

matchFunction · 0.70
dieFunction · 0.70

Tested by

no test coverage detected