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

Function keepDefectsAndElectFailures

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

Source from the content-addressed store, hash-verified

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