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

Function findDefect

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

Source from the content-addressed store, hash-verified

178
179/** @internal */
180export const findDefect = <E>(self: Cause.Cause<E>): Result.Result<unknown, Cause.Cause<E>> => {
181 const reason = self.reasons.find(isDieReason)
182 return reason ? Result.succeed(reason.defect) : Result.fail(self)
183}
184
185/** @internal */
186export const hasInterrupts = <E>(self: Cause.Cause<E>): boolean => self.reasons.some(isInterruptReason)

Callers

nothing calls this directly

Calls 3

findMethod · 0.45
succeedMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected