(u: unknown): u is AsyncFiberErrorChecks 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")) // falseguards
Source effect/Cause.ts:16501 lines
export const const isAsyncFiberError: (
u: unknown
) => u is AsyncFiberError
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
isAsyncFiberError: (u: unknownu: unknown) => u: unknownu is AsyncFiberError = import effecteffect.const isAsyncFiberError: (
u: unknown
) => u is Cause.AsyncFiberError
isAsyncFiberError