• Decodes a sum type value with the keyDecoder and decoders.

    Type Parameters

    • K extends PropertyKey

    Parameters

    • keyDecoder: Decoder<K>

      A decoder that decodes the index key of the sum type.

    Returns (<T>(variantDecoders) => Decoder<T>)

    The sum type decoder.

      • <T>(variantDecoders): Decoder<T>
      • Type Parameters

        • T

        Parameters

        • variantDecoders: Record<K, Decoder<T>>

        Returns Decoder<T>

Generated using TypeDoc