import { nullable } from "@prismicio/types-internal/lib/validators/function" import * as t from "io-ts" const codec = t.exact( t.intersection([ t.type({ title: t.string, description: t.string, }), t.partial({ imageURL: nullable(t.string), }), ]), ) export type DocumentMetadata = t.TypeOf export const DocumentMetadata = { empty: { title: "Untitled document", description: "", imageURL: undefined, }, codec, }