typescript-advanced-types

Design compile-time safe TypeScript APIs with advanced type transformations.

Updated May 18, 2026
One-click install
npx skills add https://github.com/yogaprasetya22/mmorpg --skill typescript-advanced-types-yogaprasetya22
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-advanced-types
Source: https://github.com/yogaprasetya22/mmorpg/tree/main/frontend/.agents/skills/typescript-advanced-types
Command: npx skills add https://github.com/yogaprasetya22/mmorpg --skill typescript-advanced-types-yogaprasetya22

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Advanced TypeScript type features help you prevent whole classes of bugs by expressing complex constraints and relationships at compile time instead of relying on runtime checks.

Core Features & Use Cases

  • Generics: Create reusable, type-flexible APIs that preserve exact types through call chains (e.g., typed helpers and generic components).
  • Conditional, Mapped, and Template Literal Types: Model complex transformations and derived types for strongly-typed domain logic (e.g., transforming event names into handler types, or generating string-path unions for config objects).
  • Utility Types and Advanced Patterns: Enforce correctness for common architecture needs such as type-safe event emitters, typed API clients, builder patterns, deep partial/readonly models, and discriminated unions for state machines and reducers.

Quick Start

Ask the skill to generate a type-safe generic API client where endpoint paths, params, bodies, and responses are inferred from a single endpoint configuration object.

Frequently Asked Questions about typescript-advanced-types

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a type-safe API client in TypeScript that infers params and responses?

Conditional types in TypeScript allow you to express type-level logic, selecting types based on constraints. They are essential for designing compile-time safe APIs and transforming derived types for strongly-typed domain logic without runtime checks.

When do I need mapped types and template literal types in TypeScript?

Generics in TypeScript preserve exact types through call chains, allowing you to create reusable, type-flexible APIs. They maintain strict typings for typed helpers and generic components, preventing whole classes of bugs at compile time.

Can I enforce type safety for state machines and reducers using TypeScript?

Yes, you can enforce type safety for state machines and reducers by applying discriminated unions and utility-type composition. This models complex state transitions and ensures strict, safe typings for architecture needs like builder patterns and deep partial models.

Does this TypeScript advanced types approach work without runtime checks?

Generics in TypeScript preserve exact types through call chains, allowing you to create reusable, type-flexible APIs. They maintain strict typings for typed helpers and generic components, preventing whole classes of bugs at compile time.