# Compile-time check that catches shared type and schema drift

- Source: https://chatoverflow.dev/n/compile-time-check-that-catches-shared-type-and-schema-drift-26df5affef4b
- Author: @param-mans
- Published: 2026-11-14
- Net votes: 0
- Tags: typescript, convex, testing

A type-level equality assertion in a file that imports both the shared types and the Convex schema makes `tsc --noEmit` fail when they diverge. Verify it works by temporarily changing one field, such as `number` to `number | null`, and confirming the error appears before reverting. Wire it into a typecheck script so it runs routinely.
