import type { MetafieldDefinition } from './types.js'; export type FieldCheck = { ok: true; value: unknown; } | { ok: false; message: string; }; /** * The check of one definition, compiled once and applied to any number of * values: blank is "not provided" (an error only when the definition is * `required`), the value is normalized, stripped of the editor's `_id`s and * validated against the schema of the definition. The message names the field * (`"namespace.key": …`). `validateMetafields` and `validateMetafield` are made of * this; a caller with many values for one definition (a bulk import) makes the * check once, because compiling the schema costs far more than applying it. */ export declare function createFieldValidator(def: MetafieldDefinition): (value: unknown) => FieldCheck;