FuncType - v1.4.1
    Preparing search index...

    Function createSerializer

    • Creates a serializer for the canonical envelope shape, with the @functype marker stamped at the top level (Change 0 of the 1.2.0 universal-deserialize work). Two forms:

      createSerializer(marker, value) // variant-less types (List, Map, …) createSerializer(marker, tag, value) // variants (Either, Option, …)

      Variant-less envelopes are {"@functype": marker, value}. Variant envelopes are {"@functype": marker, _tag: tag, value}.

      Parameters

      • marker: string
      • value: unknown

      Returns SerializationResult

    • Creates a serializer for the canonical envelope shape, with the @functype marker stamped at the top level (Change 0 of the 1.2.0 universal-deserialize work). Two forms:

      createSerializer(marker, value) // variant-less types (List, Map, …) createSerializer(marker, tag, value) // variants (Either, Option, …)

      Variant-less envelopes are {"@functype": marker, value}. Variant envelopes are {"@functype": marker, _tag: tag, value}.

      Parameters

      • marker: string
      • tag: string
      • value: unknown

      Returns SerializationResult