import type { z } from "zod" import { projectConfigSchema } from "../lib/project-config/project-config-schema" import schemaJson from "./tscircuit.config.schema.json" /** * Ensure every property defined in the TypeScript config schema * is represented in the JSON schema. */ type Config = z.infer type ConfigKeys = keyof Config type JsonSchemaKeys = keyof typeof schemaJson.properties type MissingTopLevelKeys = Exclude type AssertNoMissingTopLevelKeys = MissingTopLevelKeys extends never ? true : never const _assertTopLevelKeys: AssertNoMissingTopLevelKeys = true /** * Ensure nested build options stay in sync too. */ type ConfigBuildKeys = keyof NonNullable type JsonBuildKeys = keyof typeof schemaJson.properties.build.properties type MissingBuildKeys = Exclude type AssertNoMissingBuildKeys = MissingBuildKeys extends never ? true : never const _assertBuildKeys: AssertNoMissingBuildKeys = true void [_assertTopLevelKeys, _assertBuildKeys]