FuncType - v1.4.1
    Preparing search index...

    Function fromEnvelope

    • Inverse of toEnvelope: reconstruct any value from a parsed JSON envelope (object/array/primitive). Equivalent to deserialize(JSON.stringify(envelope)) but skips the stringify/parse roundtrip — the same revive walker is applied directly. Returns Try for the same reasons as deserialize.

      Pass-through policy matches deserialize: a parsed value without an @functype marker is returned verbatim as Success(value).

      Input is unknown (intentionally permissive — Postel's law). Host serializers typically hand the deserialize callback a JSON-shaped value that they parsed themselves, but their callback typing varies (some are JSONValue, some are unknown, some are any). Accepting unknown here means the function slots into any host shape without forcing a cast at the consumer site.

      Parameters

      • envelope: unknown

      Returns Try<unknown>