BUPKIS
    Preparing search index...

    Variable functionThrowsTypeAssertionConst

    functionThrowsTypeAssertion: AssertionFunctionSync<
        readonly [
            ZodCustom<
                (...args: unknown[] | readonly unknown[]) => unknown,
                (...args: unknown[] | readonly unknown[]) => unknown,
            >,
            readonly ["to throw a", "to throw an"],
            ZodCustom<Constructor, Constructor>,
        ],
        (
            subject: (...args: unknown[] | readonly unknown[]) => unknown,
            ctor: Constructor,
        ) =>
            | { 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 throw a", "to throw an"]>,
            ZodCustom<Constructor, Constructor>,
        ],
    > = ...

    Assertion for testing if a function throws an error of a specific type.

    expect(
    () => {
    throw new TypeError('wrong type');
    },
    'to throw a',
    TypeError,
    ); // passes
    expect(
    () => {
    throw new Error('oops');
    },
    'to throw an',
    TypeError,
    ); // fails