What problem does it solve? Writing complex TypeScript logic without deep type-system knowledge leads to unsafe any casts, duplicated type definitions, and runtime errors that the compiler could have caught. This Skill provides patterns and reference implementations for building type-safe applications using TypeScript's advanced type system. ## Core Features & Use Cases - Advanced Type Patterns: Covers generics with constraints, conditional types with infer, mapped types with key remapping, template literal types, and all built-in utility types. - Production Patterns: Includes ready-to-adapt implementations of typed event emitters, type-safe API clients, builder patterns with compile-time completeness checks, deep readonly/partial types, form validators, and discriminated-union state machines. - Type Inference & Testing: Explains type guards, assertion functions, the infer keyword, and type-level testing with assertion helpers. - Use Case: When building a type-safe API client where each endpoint has distinct params, body, and response types, apply the EndpointConfig pattern so invalid calls fail at compile time instead of runtime. ## Quick Start Ask the AI to design a type-safe event emitter or API client in TypeScript using generics and conditional types for your specific interfaces.