UNPKG

dilswer

Version:

Blazingly fast data validation library with TypeScript integration.

34 lines (32 loc) 988 B
var __defProp = Object.defineProperty; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); // src/data-types/types/unknown.ts import { BaseType } from "../base-type.mjs"; import { getStandardSchemaProps } from "../generate-standard-schema.mjs"; var UnknownType = class extends BaseType { constructor() { super(); __publicField(this, "kind", "simple"); __publicField(this, "simpleType", "unknown"); Object.freeze(this); } /** @internal */ _acceptVisitor(visitor, depth = 1) { return visitor.visit(this, void 0, depth); } get ["~standard"]() { return getStandardSchemaProps(this); } ["~validate"](_, __) { } ["~matches"]() { return true; } toString() { return `UnknownSchema[]`; } }; export { UnknownType };