import type { FieldType, SlicesTypes } from "@prismicio/types-internal/lib/customtypes" export interface Definition { type: T } export function isFieldDef(obj: unknown): obj is WithKey> { return typeof obj === "object" && obj !== null && "key" in obj && "def" in obj } type WithType = { type: string } export function hasType(obj: unknown): obj is WithType { return typeof obj === "object" && obj !== null && "type" in obj } export type WithKey> = { key: string def: D }