export default class SerializerFactory { static #serializers = new Map() /** * @template {AttributeConstructor} T * @param {T} type * @param {Serializer} object */ static registerSerializer(type, object) { SerializerFactory.#serializers.set(type, object) } /** * @template {AttributeConstructor} T * @param {T} type * @returns {Serializer} */ static getSerializer(type) { return SerializerFactory.#serializers.get(type) } }