Zero 'any' Types: Why Strict TypeScript Makes Better Products
Every component in Bounce Kit passes tsc --noEmit with strict: true and zero any types. This isn't a vanity metric — it directly impacts your product quality.
What any Actually Costs You
// Looks fine, passes the linter
function formatUser(user: any) {
return user.name.toUpperCase()
}
// Runtime explosion: Cannot read property 'toUpperCase' of undefined
formatUser({ id: 1 })
One any disables the entire type chain downstream. Your IDE stops helping. Your tests miss cases. Your users find the bugs.
The Strict TypeScript Guarantee
Every export in Bounce Kit has explicit types:
export interface ButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
VariantProps<typeof buttonVariants> {
asChild?: boolean
}
export function Button({ className, variant, size, asChild, ...props }: ButtonProps) {
// Full autocomplete, full type checking
}
What This Means for You
- IDE autocomplete — every prop, every time
- Compile-time safety — catch bugs before users do
- Self-documenting — types ARE the documentation
- Refactor confidence — rename a prop and TypeScript finds every usage
Maintaining Zero-Any at Scale
We enforce this with three checks:
tsconfig.jsonhasstrict: true— no exceptions- ESLint's
@typescript-eslint/no-explicit-anyrule is set toerror - CI runs
npm run typecheckon every pull request
The result: 100+ components, zero runtime type errors, and a codebase you can trust.