TypeScript review reference

Detect TypeScript type-safety anti-patterns in PRs and tsconfig changes.

Updated May 15, 2026
One-click install
npx skills add https://github.com/mattnowdev/super-review --skill typescript-review-reference
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: TypeScript review reference
Source: https://github.com/mattnowdev/super-review/tree/main/skills/typescript
Command: npx skills add https://github.com/mattnowdev/super-review --skill typescript-review-reference

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents TypeScript code that compiles and lints clean from still being wrong at runtime by targeting the type-system footguns that slip past strictness and common linters.

Core Features & Use Cases

  • Guided detection of TS 5.x anti-patterns: flags risky patterns like any vs unknown, unsafe as assertions, null/undefined drift, structural ID collisions, missing exhaustiveness checks, and shallow Readonly assumptions.
  • Feature-aware coverage for modern TS: focuses specifically on TS 5.x mechanisms that frequently get misused or missed (e.g., satisfies, const type parameters, NoInfer, and Stage 3 decorators).
  • Review prompt alignment: provides anti-pattern checklines so super-review:run can add targeted Type Safety and Correctness prompts for diffs touching *.ts/*.tsx or tsconfig.json.

Quick Start

Ask for a TypeScript-focused PR review of the changes, and request that the review check for unsafe casts, missing narrowing, and any of the listed TS 5.x anti-patterns in the modified files.

Frequently Asked Questions about TypeScript review reference

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I catch TypeScript type-safety issues that pass compilation and linting but fail at runtime?

To catch TypeScript type-safety issues that pass compilation, review diffs for unsafe `as` assertions, `any` vs `unknown` drift, and missing exhaustiveness checks in discriminated unions. Targeting these anti-patterns prevents runtime errors that strict mode and common linters miss.

What TypeScript 5.x anti-patterns should I look for during a code review?

During a TypeScript 5.x code review, look for misuse of `satisfies`, `const` type parameters, `NoInfer`, and Stage 3 decorators. Also check for structural ID collisions, shallow `Readonly` assumptions, and boundary validation gaps that compromise type safety.

How do I review a PR for unsafe type assertions and missing narrowing in TypeScript?

Review a PR for unsafe type assertions and missing narrowing by applying a targeted checklist to modified `*.ts` or `*.tsx` files. Flag risky `as` casts, `null`/`undefined` drift, and missing literal preservation to ensure safe remediation patterns.

Does this TypeScript review approach work with `tsconfig.json` changes?

Yes, this TypeScript review approach works with `tsconfig.json` changes. It applies to PRs modifying TypeScript source files or tsconfig settings, evaluating boundary validation and literal preservation impacts on type system strictness.

Why does my TypeScript code compile clean but still have type-system footguns?

TypeScript code compiles clean but still has footguns because strictness settings and linters miss boundary validation gaps, unsafe casts, and shallow `Readonly` assumptions. Modern TS 5.x constructs like `satisfies` require targeted detection signals to remediate.

When do I need to check for exhaustiveness in TypeScript discriminated unions?

Check for exhaustiveness in TypeScript discriminated unions whenever code modifies boundary validations or handles multiple union variants. Missing exhaustiveness checks allow unhandled cases to pass compilation while remaining error-prone during real execution.