decodeObjectSKey
export function decodeObjectSKey<Decoders extends {[key: string]: Decoder<any>}>(
bytes: BytesLike,
fieldDecoders: Decoders
): {[D in string
| number
| symbol]: Decoders[D] extends Decoder<T>
? T
: never}
Decodes a CBOR encoded object with string keys. For each field a decoder is called which takes the field index and the field bytes as arguments.
Type parameters
Decoders
Decoders extends {[key: string]: Decoder<any>}
Arguments
1. bytes
bytes: BytesLike
2. fieldDecoders
fieldDecoders: Decoders
Returns
{[D in string
| number
| symbol]: Decoders[D] extends Decoder<T>
? T
: never}