string.js 320 B

123456789101112
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. const schema_1 = require("../schema");
  4. class StringSchema extends schema_1.Schema {
  5. expected() {
  6. return 'a string';
  7. }
  8. validate(value) {
  9. return typeof value === 'string';
  10. }
  11. }
  12. exports.StringSchema = StringSchema;