(self: Cause.Cause<E>)
| 201 | * @internal |
| 202 | */ |
| 203 | export const causeElectDefects = <E>(self: Cause.Cause<E>): Cause.Cause<E> => |
| 204 | hasDies(self) && hasFails(self) |
| 205 | ? causeFromReasons( |
| 206 | self.reasons.map((reason) => |
| 207 | reason._tag === "Fail" && !isDone(reason.error) ? new Die(reason.error, reason.annotations) : reason |
| 208 | ) |
| 209 | ) |
| 210 | : self |
| 211 | |
| 212 | /** |
| 213 | * Selects the first typed error unless a defect is present, in which case |
no test coverage detected