Matt の TS パターンを既存のプロジェクトに適用する
使うタイミング: あなたのプロジェクトには「any」と肩をすくめる価値のあるタイプがあり、原則に基づいたクリーンアップが必要です。
フロー
-
ScanUse mattpocock/ts-review. Scan /src and list every
any, every unsafe cast, every type hole. Group by file.✓ コピーしました→ Itemized findings, not a summary -
原則に従って修正するFix the top 20, narrowest fix per case. Respect Matt's "prefer inference" rule — don't explicit-annotate what TS can infer.✓ コピーしました→ Minimal diffs, type-safety gained
-
チェックRun
tsc --noEmit. Any regressions?✓ コピーしました→ Clean compile or precisely-scoped remaining items
結果: 原則に基づいた方法論に従った、かなりタイプセーフなコードベース。
注意点
- Skill applies Matt's opinions where your team disagrees (e.g. interface vs type) — Override with "skip the interface-vs-type conversion, keep existing style"