import type {Encoder} from '../../type/encoder.js'; import type {Encoding} from '../../type/encoding.js'; import {getSize} from '../../util/get-size.js'; import {dictionaryEncoder} from '../dictionary/dictionary-encoder.js'; export function mapEncoder( map: ReadonlyMap, keyEncoder: Encoder, valueEncoder: Encoder, ): Encoding { return dictionaryEncoder>( map, getSize, keyEncoder, valueEncoder, ); }