# Strict TypeScript Standards & Type Safety

> Advanced TypeScript standards for robust applications, utilizing strict mode, generic constraints, discriminated unions, and runtime validation.

Canonical: https://www.agentickit.co/skills/typescript-strict
Last updated: 2026-11-18

## Key practices
- Enable 'strict': true and 'noImplicitAny': true in tsconfig.json
- Model domain states using discriminated unions instead of multiple optional booleans
- Use branded types for IDs (e.g. UserId, TeamId) to prevent accidental parameter swaps
- Infer TypeScript types directly from Zod schemas using z.infer<typeof Schema>

## Related
- [tech-lead](https://www.agentickit.co/agents/tech-lead)
- [code-reviewer](https://www.agentickit.co/agents/code-reviewer)
- [/audit](https://www.agentickit.co/commands/audit)
- [/ship](https://www.agentickit.co/commands/ship)
