UNPKG

dynamodb-toolbox

Version:

Lightweight and type-safe query builder for DynamoDB and TypeScript.

18 lines (17 loc) 412 B
import { checkPrimitiveSchema } from '../primitive/check.js'; export class BooleanSchema { constructor(props) { this.type = 'boolean'; this.props = props; } get checked() { return Object.isFrozen(this.props); } check(path) { if (this.checked) { return; } checkPrimitiveSchema(this, path); Object.freeze(this.props); } }