UNPKG

@prismicio/types-internal

Version:
22 lines (21 loc) 676 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Text = exports.TextConfig = exports.TextFieldType = void 0; const tslib_1 = require("tslib"); const t = (0, tslib_1.__importStar)(require("io-ts")); const validators_1 = require("../../../validators"); exports.TextFieldType = "Text"; exports.TextConfig = t.exact(t.partial({ label: validators_1.StringOrNull, useAsTitle: t.boolean, placeholder: t.string, })); exports.Text = t.exact(t.intersection([ t.type({ type: t.literal(exports.TextFieldType), }), t.partial({ fieldset: validators_1.StringOrNull, config: exports.TextConfig, }), ]));