The assertion part to convert to a slot
// String literal -> branded slot
type Slot1 = AssertionSlot<'to be a string'>; // PhraseLiteralSlot<'to be a string'>
// Choice -> branded choice slot
type Slot2 = AssertionSlot<['to be', 'to equal']>; // PhraseLiteralChoiceSlot<['to be', 'to equal']>
// Zod type -> preserved
type Slot3 = AssertionSlot<z.ZodString>; // z.ZodString
// Standard Schema -> wrapped at runtime
type Slot4 = AssertionSlot<v.string()>; // z.ZodType (generic, not specific wrapper type)
slotify for the runtime transformation that wraps Standard Schema validators
Type-level mapping that converts an assertion part to its corresponding validation slot.
This maps each type of assertion part to a specific Zod schema that can be used for runtime validation:
neverImportant: Standard Schema parts are typed as
z.ZodTypebecause at runtime they are wrapped inz.custom()byslotify. This type reflects the runtime reality rather than the input type. The wrapper allows slots to use Zod's.safeParse()and.defproperties uniformly, while the Standard Schema's actual validation is called internally.Order matters: Must check
z.ZodTypebeforeStandardSchemaV1because Zod v4 implements Standard Schema v1, so all Zod types would match both.