In plain words
TypeScript lets the code say what shape each value should have, so mistakes like a missing field get caught before the app runs.
Where you see it
Files ending in .ts or .tsx, and words after a colon, like price: number. When a Vercel build fails with "Type error: Property 'email' does not exist on type 'Member'", TypeScript caught a mismatch before it shipped.
What goes wrong
- Silencing errors with any
any switches checking off for that value. When the agent adds as any to get a build through, the bug is still there, only hidden.
const member = data as any; - Types that don't match the database
The type says bio is always a string, but Supabase returns null when that field is empty. Generate types from your schema so the two stay in step.
- Trusting types for data from outside
Types are checked while the app is built, not while it runs. A form or an API can still send anything, so outside data needs checking at runtime too.
What to tell your agent
Quick check
Sign in to earn +10 XP for itYour Vercel build fails with a type error, and the agent's fix adds as any. What's true?