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