Skip to content
bastani-inc avatar

Typescript Advanced Types

Comprehensive guide to TypeScript's advanced type system for building reusable, compile-time-safe type logic.

CCM score
53 of 100
skills.sh installs
164
GitHub stars
886
last updated
Jun 3, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers generics, conditional types, mapped types, template literal types, and built-in utility types
  • Includes worked patterns such as a type-safe event emitter and a type-safe API client keyed by endpoint and method
  • Demonstrates constraints, distributive conditionals, key remapping, and path-building with concrete code examples
  • Designed for library authors, typed API clients, form validation, and migrating JavaScript codebases to TypeScript

Install

$ npx -y skills add bastani-inc/atomic --skill typescript-advanced-types -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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

Purpose: Create reusable, type-flexible components while maintaining type safety.

Basic Generic Function:

function identity<T>(value: T): T {
  return value;
}

const num = identity<number>(42); // Type: number
const str = identity<string>("hello"); // Type: string
const auto = identity(true); // Type inferred: boolean

Generic Constraints:

interface HasLength {
  length: number;
}

function logLength<T extends HasLength>(item: T): T {
  console.log(item.length);
  return item;
}

Details

Repository
github.com/bastani-inc/atomic
Categories
Frontend & UI Code, Backend & APIs
First seen
Jun 3, 2026

Questions

What does the typescript-advanced-types skill help with?

typescript-advanced-types guides you through TypeScript's advanced type system, including generics, conditional types, mapped types, template literal types, and utility types. It is meant for building type-safe applications, reusable type utilities, and compile-time type safety in TypeScript projects.

When should I use the typescript-advanced-types skill?

Use typescript-advanced-types when implementing complex type logic, building type-safe libraries or frameworks, or designing type-safe API clients. It also fits migrating JavaScript codebases to TypeScript and creating strongly typed configuration objects.

How do I install the typescript-advanced-types skill?

Run npx -y skills add bastani-inc/atomic --skill typescript-advanced-types -y in your project to install typescript-advanced-types. After that, the agent can apply its guidance on generics, mapped types and template literal types in your TypeScript code.

Where does typescript-advanced-types stand among Frontend and UI Code skills?

typescript-advanced-types is listed in the Frontend and UI Code category on Claude Marketplaces, next to vercel-react-best-practices and web-design-guidelines. Its focus is the TypeScript type system itself rather than UI patterns.

More from bastani-inc/atomic

All 11

Similar to Typescript Advanced Types

More Frontend & UI Code