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

Function keepDefects

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

Source from the content-addressed store, hash-verified

277
278/** @internal */
279export const keepDefects = <E>(self: Cause.Cause<E>): Option.Option<Cause.Cause<never>> =>
280 match(self, {
281 onEmpty: Option.none(),
282 onFail: () => Option.none(),
283 onDie: (defect) => Option.some(die(defect)),
284 onInterrupt: () => Option.none(),
285 onSequential: Option.mergeWith(sequential),
286 onParallel: Option.mergeWith(parallel)
287 })
288
289/** @internal */
290export const keepDefectsAndElectFailures = <E>(self: Cause.Cause<E>): Option.Option<Cause.Cause<never>> =>

Callers

nothing calls this directly

Calls 2

matchFunction · 0.70
dieFunction · 0.70

Tested by

no test coverage detected