Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
21 lines
788 B
Text
21 lines
788 B
Text
// @ts-ignore TS6133
|
|
import { test } from "vitest";
|
|
|
|
import type { ZodFirstPartySchemaTypes, ZodFirstPartyTypeKind } from "zod/v3";
|
|
import { util } from "../helpers/util.js";
|
|
|
|
test("Identify missing [ZodFirstPartySchemaTypes]", () => {
|
|
type ZodFirstPartySchemaForType<T extends ZodFirstPartyTypeKind> = ZodFirstPartySchemaTypes extends infer Schema
|
|
? Schema extends { _def: { typeName: T } }
|
|
? Schema
|
|
: never
|
|
: never;
|
|
type ZodMappedTypes = {
|
|
[key in ZodFirstPartyTypeKind]: ZodFirstPartySchemaForType<key>;
|
|
};
|
|
type ZodFirstPartySchemaTypesMissingFromUnion = keyof {
|
|
[key in keyof ZodMappedTypes as ZodMappedTypes[key] extends { _def: never } ? key : never]: unknown;
|
|
};
|
|
|
|
util.assertEqual<ZodFirstPartySchemaTypesMissingFromUnion, never>(true);
|
|
});
|