UNPKG

@effect-ts/system

Version:

Effect-TS is a zero dependency set of libraries to write highly productive, purely functional TypeScript at scale.

17 lines (14 loc) 306 B
// ets_tracing: off import type { Effect } from "./effect.js" import { fold_ } from "./fold.js" /** * Returns whether this effect is a failure. */ export function isFailure<R, E, A>(self: Effect<R, E, A>, __trace?: string) { return fold_( self, () => true, () => false, __trace ) }