UNPKG

dynamodb-toolbox

Version:

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

22 lines (21 loc) 555 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StringSchema = void 0; const check_js_1 = require("../primitive/check.js"); class StringSchema { constructor(props) { this.type = 'string'; 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.StringSchema = StringSchema;