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

Function cause

packages/effect/src/unstable/reactivity/AsyncResult.ts:451–452  ·  view source on GitHub ↗
(self: AsyncResult<A, E>)

Source from the content-addressed store, hash-verified

449 * @since 4.0.0
450 */
451export const cause = <A, E>(self: AsyncResult<A, E>): Option.Option<Cause.Cause<E>> =>
452 self._tag === "Failure" ? Option.some(self.cause) : Option.none()
453
454/**
455 * Returns the first typed error from a failure cause, or `None` for successes, initial results, defects, and interrupt-only causes.

Callers 3

ExitFunction · 0.85
Schema.tsFile · 0.85
SchemaFunction · 0.85

Calls 1

someMethod · 0.80

Tested by

no test coverage detected