BUPKIS
    Preparing search index...

    Variable objectExactKeyAssertionConst

    objectExactKeyAssertion: AssertionFunctionSync<
        readonly [
            ZodCustom<
                Record<PropertyKey, unknown>
                | ((...args: any[]) => any),
                Record<PropertyKey, unknown> | ((...args: any[]) => any),
            >,
            readonly [
                "to have exact key",
                "to have exact property",
                "to have exact prop",
            ],
            ZodUnion<readonly [ZodString, ZodNumber, ZodSymbol]>,
        ],
        (
            _: Record<PropertyKey, unknown> | ((...args: any[]) => any),
            key: string | number | symbol,
        ) => ZodPipe<
            ZodCustom<
                Record<PropertyKey, unknown>
                | ((...args: any[]) => any),
                Record<PropertyKey, unknown> | ((...args: any[]) => any),
            >,
            ZodTransform<{}, Record<PropertyKey, unknown> | ((...args: any[]) => any)>,
        >,
        readonly [
            ZodCustom<
                Record<PropertyKey, unknown>
                | ((...args: any[]) => any),
                Record<PropertyKey, unknown> | ((...args: any[]) => any),
            >,
            PhraseLiteralChoiceSlot<
                readonly [
                    "to have exact key",
                    "to have exact property",
                    "to have exact prop",
                ],
            >,
            ZodUnion<readonly [ZodString, ZodNumber, ZodSymbol]>,
        ],
    > = ...

    Asserts that an object has an exact property key without keypath traversal. This assertion checks for direct properties on the object and supports symbols and keys that would conflict with bracket/dot notation.

    Unlike objectKeyAssertion, this does not use the has() function and therefore:

    • Does not support keypath traversal (no dots or brackets)
    • Can check for symbol keys
    • Can check for keys containing dots, brackets, or other special characters
    • Only checks direct properties (no nested access)
    const sym = Symbol('test');
    const obj = {
    simple: 'value',
    'key.with.dots': 'direct property',
    'key[with]brackets': 'another direct property',
    [sym]: 'symbol value',
    };

    expect(obj, 'to have exact key', 'simple'); // passes
    expect(obj, 'to have exact property', 'key.with.dots'); // passes (literal key)
    expect(obj, 'to have exact prop', 'key[with]brackets'); // passes (literal key)
    expect(obj, 'to have exact key', sym); // passes (symbol key)

    // These would fail because they're not direct properties:
    expect(obj, 'to have exact key', 'nested.path'); // fails (no keypath traversal)

    object-to-have-only-keys-array

    object