effect-io-ai

Package: effect
Module: Cause

Cause.isAsyncFiberError

Checks whether an arbitrary value is an AsyncFiberError.

Example (Checking the runtime type)

import { Cause } from "effect"
import type { Fiber } from "effect"

declare const fiber: Fiber.Fiber<unknown, unknown>

const error = new Cause.AsyncFiberError(fiber)
console.log(Cause.isAsyncFiberError(error)) // true
console.log(Cause.isAsyncFiberError("nope")) // false

Signature

declare const isAsyncFiberError: (u: unknown) => u is AsyncFiberError

Source

Since v4.0.0