Type Parameters
O extends object
K extends PropertyKey = keyof O
Returns ((keyExtractor) => ((keyEncoder) => Encoder<T>))
The encoder for the sum type.
- (keyExtractor): ((keyEncoder) => Encoder<T>)
Parameters
keyExtractor: ((value) => K)
Returns ((keyEncoder) => Encoder<T>)
Encodes a sum type value with encoders and functions for index key.