UNPKG

@prismicio/types-internal

Version:
9 lines (8 loc) 422 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UUID = void 0; const tslib_1 = require("tslib"); const t = (0, tslib_1.__importStar)(require("io-ts")); const uuid_1 = require("uuid"); const function_1 = require("../validators/function"); exports.UUID = (0, function_1.withCustomError)(t.brand(t.string, (s) => (0, uuid_1.validate)(s), "UUID"), () => "The value must be a valid UUID");