var BooleanMapper = /** @class */ (function () {
    function BooleanMapper() {
    }
    BooleanMapper.prototype.fromDb = function (dbValue) {
        if (dbValue.BOOL === undefined) {
            throw new Error('only attribute values with BOOL value can be mapped to a boolean');
        }
        return dbValue.BOOL === true;
    };
    BooleanMapper.prototype.toDb = function (modelValue) {
        if (!(modelValue === true || modelValue === false)) {
            throw new Error('only boolean values are mapped to a BOOl attribute');
        }
        return { BOOL: modelValue };
    };
    return BooleanMapper;
}());
export { BooleanMapper };
//# sourceMappingURL=boolean.mapper.js.map