BUPKIS
    Preparing search index...

    Variable functionRejectWithTypeAssertionConst

    functionRejectWithTypeAssertion: AssertionFunctionAsync<
        readonly [
            ZodCustom<
                (...args: unknown[] | readonly unknown[]) => unknown,
                (...args: unknown[] | readonly unknown[]) => unknown,
            >,
            readonly [
                "to reject with a",
                "to reject with an",
                "to be rejected with a",
                "to be rejected with an",
            ],
            ZodCustom<Constructor, Constructor>,
        ],
        (
            subject: (...args: unknown[] | readonly unknown[]) => unknown,
            ctor: Constructor,
        ) => Promise<
            | { actual?: undefined; expected?: undefined; message: string }
            | { actual: string; expected: string; message: string }
            | undefined,
        >,
        readonly [
            ZodCustom<
                (...args: unknown[] | readonly unknown[]) => unknown,
                (...args: unknown[] | readonly unknown[]) => unknown,
            >,
            PhraseLiteralChoiceSlot<
                readonly [
                    "to reject with a",
                    "to reject with an",
                    "to be rejected with a",
                    "to be rejected with an",
                ],
            >,
            ZodCustom<Constructor, Constructor>,
        ],
    > = ...

    Assertion for testing if a function rejects with a specific error type.

    await expectAsync(
    () => Promise.reject(new TypeError('wrong')),
    'to reject with a',
    TypeError,
    ); // passes
    await expectAsync(
    () => Promise.reject(new Error('wrong')),
    'to reject with an',
    TypeError,
    ); // fails