Loading...
Loading...
TypeScript refactoring and modernization guidelines from a principal specialist perspective. This skill should be used when refactoring, reviewing, or modernizing TypeScript code to ensure type safety, compiler performance, and idiomatic patterns. Triggers on tasks involving TypeScript type architecture, narrowing, generics, error handling, or migration to modern TypeScript features.
npx skill4agent add pproenca/dot-skills typescript-refactorassatisfiesusing| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Type Architecture | CRITICAL | |
| 2 | Type Narrowing & Guards | CRITICAL | |
| 3 | Modern TypeScript | HIGH | |
| 4 | Generic Patterns | HIGH | |
| 5 | Compiler Performance | MEDIUM-HIGH | |
| 6 | Error Safety | MEDIUM | |
| 7 | Runtime Patterns | MEDIUM | |
| 8 | Quirks & Pitfalls | LOW-MEDIUM | |
arch-discriminated-unionsarch-branded-typesarch-satisfies-over-annotationsatisfiesarch-interfaces-over-intersectionsarch-const-assertionas constarch-readonly-by-defaultarch-avoid-partial-abusePartial<T>narrow-custom-type-guardsnarrow-assertion-functionsnarrow-exhaustive-switchnevernarrow-in-operatorinnarrow-eliminate-as-castsasnarrow-typeof-chainstypeofmodern-using-keywordusingmodern-const-type-parametersmodern-template-literal-typesmodern-noinfer-utilityNoInfermodern-accessor-keywordaccessormodern-verbatim-module-syntaxverbatimModuleSyntaxgeneric-infer-over-annotategeneric-constrain-dont-overconstraingeneric-avoid-distributive-surprisesgeneric-mapped-type-utilitiesgeneric-return-type-inferencecompile-explicit-return-typescompile-avoid-deep-recursioncompile-project-referencescompile-base-types-over-unionserror-result-typeerror-exhaustive-error-handlingerror-typed-catchunknownerror-never-for-unreachablenevererror-discriminated-error-unionsperf-union-literals-over-enumsperf-avoid-delete-operatordeleteperf-object-freeze-constObject.freezeas constperf-object-keys-narrowingObject.keysperf-map-set-over-objectMapSetquirk-excess-property-checksquirk-empty-object-type{}quirk-type-widening-letletquirk-variance-annotationsquirk-structural-typing-escapes| File | Description |
|---|---|
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |