effect-io-ai

Package: effect
Module: Cause

Cause.empty

Represents a Cause with an empty reasons array.

When to use

Use to represent the absence of failure when constructing or combining causes.

Details

Represents the absence of failure. Combining any cause with empty via combine returns the original cause unchanged.

Example (Combining with the empty cause)

import { Cause } from "effect"

const cause = Cause.combine(Cause.empty, Cause.fail("boom"))

console.log(cause.reasons.length) // 1
console.log(Cause.hasFails(cause)) // true

See

Signature

declare const empty: Cause<never>

Source

Since v2.0.0