UNPKG

@prismicio/types-internal

Version:
22 lines (21 loc) 709 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BooleanField = exports.BooleanConfig = exports.BooleanFieldType = void 0; const tslib_1 = require("tslib"); const t = (0, tslib_1.__importStar)(require("io-ts")); const validators_1 = require("../../../validators"); exports.BooleanFieldType = "Boolean"; exports.BooleanConfig = t.exact(t.partial({ label: validators_1.StringOrNull, default_value: t.boolean, placeholder_true: t.string, placeholder_false: t.string, })); exports.BooleanField = t.exact(t.intersection([ t.type({ type: t.literal(exports.BooleanFieldType), }), t.partial({ config: exports.BooleanConfig, }), ]));