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