dynamodb-toolbox
Version:
Lightweight and type-safe query builder for DynamoDB and TypeScript.
22 lines (21 loc) • 560 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BooleanSchema = void 0;
const check_js_1 = require("../primitive/check.js");
class BooleanSchema {
constructor(props) {
this.type = 'boolean';
this.props = props;
}
get checked() {
return Object.isFrozen(this.props);
}
check(path) {
if (this.checked) {
return;
}
(0, check_js_1.checkPrimitiveSchema)(this, path);
Object.freeze(this.props);
}
}
exports.BooleanSchema = BooleanSchema;