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
inferkeyword, 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 in React
vercel-react-best-practices
69 prioritized React performance rules covering waterfalls, bundle size, re-renders, and advanced patterns
vercel-labs/agent-skillsvercel-composition-patterns
Compound components, render props, and context patterns for scalable component APIs
vercel-labs/agent-skillsshadcn
shadcn/ui component usage, customization, and Tailwind integration
shadcn/uiwebapp-testing
Testing React apps: unit, integration, and end-to-end patterns
anthropics/skillstailwind-design-system
Design system implementation with Tailwind: tokens, variants, and component patterns
wshobson/agents