bupkis
    Preparing search index...

    Type Alias AddNegation<Parts>

    AddNegation: Parts extends readonly [
        infer First extends AssertionPart,
        ...(infer Rest extends readonly AssertionPart[]),
    ]
        ? First extends PhraseLiteralChoice
            ? readonly [
                {
                    [K in keyof First]: First[K] extends PhraseLiteral
                        ? Negation<First[K]>
                        : never
                },
                ...AddNegation<Rest>,
            ]
            : First extends PhraseLiteral
                ? readonly [Negation<First>, ...AddNegation<Rest>]
                : readonly [First, ...AddNegation<Rest>]
        : readonly []

    Creates a negated version of a tuple of AssertionParts.

    For PhraseLiterals, creates a "not" variant. For PhraseLiteralChoices, creates negated versions of each Phrase in the array.

    Does not affect Zod schemas.

    Type Parameters

    • Parts extends readonly AssertionPart[]

      Parts containing PhraseLiterals or PhraseLiteralChoices to negate.