"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Serializable = void 0;
class Serializable {
    constructor(options) {
        this.serialize = options.serialize;
        this.deserialize = options.deserialize;
    }
    serialize;
    deserialize;
    serializeArray(value) {
        return (value || []).map(this.serialize);
    }
    deserializeArray(data) {
        return data.map(this.deserialize);
    }
}
exports.Serializable = Serializable;
//# sourceMappingURL=serializable.js.map