type-safety
Installation
SKILL.md
Contains Shell Commands
This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.
Type Safety (Strict)
The type system is a proof engine: model the domain precisely enough and whole classes of bugs stop compiling. The goal is to make illegal states unrepresentable — a value that can't exist in the domain shouldn't be expressible in the types. Every any, every broad string, every unchecked index is a hole where a runtime crash leaks back in.
The rules below are the checklist. Every one has a worked // Bad / // Good example in references/patterns.md — read the table here, go there for the shape.
This assumes a strict tsconfig.json. These are non-negotiable:
// tsconfig.json — the floor for every app
{
"compilerOptions": {
"strict": true,
"noUncheckedIndexedAccess": true, // array/record access yields T | undefined
"exactOptionalPropertyTypes": true, // `x?: T` ≠ `x: T | undefined`
"noImplicitOverride": true
}
}