typescript-type-safety

Installation
SKILL.md

House skill. Pair with typescript-common-practice. This skill focuses on whether TypeScript's proof is real. It does not replace runtime validation libraries, domain architecture, or browser/framework skills.

The central rule

A TypeScript type annotation does not change a runtime value.

The compiler can prove relationships among values only from information it has. Assertions, any, suppressions, and dishonest type guards can remove the proof obligation without making the program safer.

Ask of every load-bearing type claim: what code or trusted boundary established this fact?

If the answer is only "we cast it," the fact is not established.

Unknown at untrusted boundaries

Use unknown for values whose shape is not yet established: parsed JSON, environment-derived structures, network responses, browser storage, message/event payloads, plugin/tool input, and loosely typed third-party values.

Narrow or parse unknown before using it.

Installs
9
Repository
bateau84/skills
First Seen
13 days ago