UNPKG

@prismicio/types-internal

Version:
26 lines (21 loc) 506 B
import * as t from "io-ts" import { StringOrNull } from "../../../validators" export const GeoPointFieldType = "GeoPoint" export const GeoPointConfig = t.exact( t.partial({ label: StringOrNull, }), ) export type GeoPointConfig = t.TypeOf<typeof GeoPointConfig> export const GeoPoint = t.exact( t.intersection([ t.type({ type: t.literal(GeoPointFieldType), }), t.partial({ fieldset: StringOrNull, config: GeoPointConfig, }), ]), ) export type GeoPoint = t.TypeOf<typeof GeoPoint>