import * as ByteBuffer from "bytebuffer"; import ISerializer, { SerializerInput, SerializerOutput } from "../ISerializer"; type TStrictInput = Map, SerializerOutput> | [SerializerInput, SerializerOutput][]; type TInput = string extends SerializerInput ? TStrictInput | { [key: string]: SerializerInput } : TStrictInput; type TOutput = [SerializerOutput, SerializerOutput][]; export default class MapSerializer extends ISerializer< TInput, TOutput > { readonly keySerializer: TKey; readonly valueSerializer: TValue; constructor(keySerializer: TKey, valueSerializer: TValue); toRaw(value: TInput): TOutput; appendToByteBuffer(value: TInput, bytebuffer: ByteBuffer): void; readFromBuffer(buffer: Buffer, offset?: number): { res: TOutput, newOffset: number }; }