typescript-advanced-types

Installation
Summary

Advanced TypeScript type system patterns for building type-safe, reusable components and utilities.

  • Covers five core concepts: generics with constraints, conditional types with inference, mapped types for property transformation, template literal types for string patterns, and built-in utility types
  • Includes six advanced patterns: type-safe event emitters, API clients, builder patterns, deep readonly/partial, form validation, and discriminated unions for robust type narrowing
  • Demonstrates type inference techniques using the infer keyword, type guards, and assertion functions for compile-time safety
  • Provides best practices including strict mode configuration, type testing strategies, and guidance on avoiding common pitfalls like circular references and over-complex types
SKILL.md

TypeScript Advanced Types

Comprehensive guidance for mastering TypeScript's advanced type system including generics, conditional types, mapped types, template literal types, and utility types for building robust, type-safe applications.

When to Use This Skill

  • Building type-safe libraries or frameworks
  • Creating reusable generic components
  • Implementing complex type inference logic
  • Designing type-safe API clients
  • Building form validation systems
  • Creating strongly-typed configuration objects
  • Implementing type-safe state management
  • Migrating JavaScript codebases to TypeScript

Core Concepts

1. Generics

Related skills

More from wshobson/agents

Installs
40.4K
Repository
wshobson/agents
GitHub Stars
35.2K
First Seen
Jan 20, 2026