bupkis
    Preparing search index...

    Type Alias Negation<S>

    Negation: `not ${S}`

    Creates a negated version of a phrase literal by prefixing "not ".

    This utility type transforms assertion phrases into their negated equivalents, enabling the natural language negation feature in Bupkis assertions. When users provide phrases like "not to be a string", this type helps the system understand and process the negation.

    The negation is applied at the type level during assertion matching and affects how the assertion logic is executed - negated assertions expect the opposite result.

    Type Parameters

    • S extends string

      The string literal phrase to be negated

    type Negated = Negation<'to be a string'>; // "not to be a string"
    type AlsoNegated = Negation<'to equal'>; // "not to equal"

    // Usage in assertions:
    expect(42, 'not to be a string'); // Uses negated assertion logic
    • AddNegation for applying negation to entire AssertionParts tuples
    • MapExpectSlots for how negation is incorporated into function signatures