@mikuroxina/mini-fn
    Preparing search index...

    Function encSum

    • Encodes a sum type value with encoders and functions for index key.

      Type Parameters

      • O extends object
      • K extends PropertyKey = keyof O
      • T = Encoding<O[keyof O]>

      Parameters

      • variantEncoders: O

        Encoders for each variant of the sum type.

      Returns (keyExtractor: (value: T) => K) => (keyEncoder: Encoder<K>) => Encoder<T>

      The encoder for the sum type.