FuncType - v1.4.1
    Preparing search index...

    Function envelope

    • Build the canonical {@functype, _tag, value} envelope OBJECT used by both the instance toJSON() (which returns it directly so native JSON.stringify can recurse) and the serialize().toJSON() method (which stringifies it).

      _tag is always emitted — variant-less types pass the same string for marker and tag (default behavior when tag is omitted). Keeping _tag across the board preserves back-compat for readers that did if (parsed._tag === "List") against 1.1.0 envelopes.

      Parameters

      • marker: string

        The @functype type marker, e.g. "Either", "Option".

      • tag: string | undefined

        The variant discriminator, e.g. "Right", "Some". Defaults to marker for types without variants (List, Map, etc.).

      • value: unknown

        The payload.

      Returns FunctypeEnvelope