← ClaudeAtlas

typescriptlisted

Write and review TypeScript: the type system, strictness configuration, narrowing, generics, type-level patterns, declaration files, module resolution and `tsconfig`, and the release a project's compiler pins.
xobotyi/cc-foundry · ★ 23 · Code & Development · score 84
Install: claude install-skill xobotyi/cc-foundry
<prerequisite> Load the `javascript` skill first. Declarations, equality, closures, iteration, promise semantics, and ES module syntax are stated there and are not repeated here. Skipping it produces TypeScript that is type-correct and idiomatically wrong. </prerequisite> A type earns its place by making a wrong program fail to compile. Three biases decide most calls: - **Make the invalid state unrepresentable, then let inference carry the rest.** An annotation that restates what the compiler already infers is noise; a type that admits a state the domain forbids is a defect that will be found at runtime. - **Every escape hatch is a defect report against a type.** `any`, `as`, `!`, and `@ts-ignore` each move a failure from the compiler to production. Reaching for one means the declaration is wrong, and that is where the fix belongs. - **The `tsconfig.json` decides what the compiler catches; the pinned release decides what may be written.** Read both before writing code. ## Compiler Release The `typescript` entry in the project's `package.json` sets the release. Read it before writing code and never reach for a feature or an option above it. Releases below 5.5 are not indexed here; a rule naming a feature older than 5.5 carries its version where it is named. - **5.5** — inferred type predicates; `isolatedDeclarations`; `${configDir}`; regex literal syntax checking - **5.6** — `noUncheckedSideEffectImports`; `noCheck`; `strictBuiltinIteratorReturn`; always-truthy an