bupkis
    Preparing search index...

    Type Alias AssertionSlot<Part>

    AssertionSlot: Part extends string
        ? PhraseLiteralSlot<Part>
        : Part extends readonly [string, ...string[]]
            ? PhraseLiteralChoiceSlot<Part>
            : Part extends z.ZodType ? Part : never

    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:

    • String literals become branded phrase literal slots
    • String literal choices become branded phrase choice slots
    • Zod types are preserved as-is
    • Invalid parts become never

    Type Parameters

    • Part extends AssertionPart

      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