UNPKG

@prismicio/types-internal

Version:
23 lines (22 loc) 810 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Select = exports.SelectConfig = exports.SelectFieldType = void 0; const tslib_1 = require("tslib"); const t = (0, tslib_1.__importStar)(require("io-ts")); const validators_1 = require("../../../validators"); exports.SelectFieldType = "Select"; exports.SelectConfig = t.exact(t.partial({ label: validators_1.StringOrNull, placeholder: t.string, default_value: t.string, options: t.readonlyArray(t.union([t.string, validators_1.StringFromNumber, validators_1.StringFromBoolean])), })); exports.Select = t.exact(t.intersection([ t.type({ type: t.literal(exports.SelectFieldType), }), t.partial({ fieldset: validators_1.StringOrNull, config: exports.SelectConfig, }), ]));