function / @typed/fx/Fx

isFx

Checks whether a value carries the FxTypeId protocol property.

Package version
2.0.0-beta.7
Category
Runtime inspection
Since
1.0.0

Import

import { isFx } from "@typed/fx/Fx";

Signatures

export declare function isFx(u: unknown): u is Fx<any, any, any>;

Why

Interoperability code can distinguish an already constructed Fx from effects, streams, iterables, and arbitrary values before choosing an explicit adapter.

Ownership and lifetime

The guard performs one property check. It does not subscribe to or run the value.

Examples

import { isFx, succeed } from "@typed/fx/Fx"

const candidate: unknown = succeed(42)
const value = isFx(candidate) ? candidate : succeed(candidate)

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source