dynamodb-toolbox
Version:
Lightweight and type-safe query builder for DynamoDB and TypeScript.
18 lines (17 loc) • 409 B
JavaScript
import { checkSchemaProps } from '../utils/checkSchemaProps.js';
export class AnySchema {
constructor(props) {
this.type = 'any';
this.props = props;
}
get checked() {
return Object.isFrozen(this.props);
}
check(path) {
if (this.checked) {
return;
}
checkSchemaProps(this.props, path);
Object.freeze(this.props);
}
}