typescript-advanced

Advanced TypeScript patterns including generics, conditional types, mapped types, template literals, and type guards

Content Preview
---
name: typescript-advanced
description: Advanced TypeScript patterns including generics, conditional types, mapped types, template literals, and type guards
---

# TypeScript Advanced

## Generics with Constraints

```typescript
interface HasId {
  id: string;
}

function findById<T extends HasId>(items: T[], id: string): T | undefined {
  return items.find(item => item.id === id);
}

function groupBy<T, K extends string | number>(
  items: T[],
  keyFn: (item: T) => K
): Record<K, T[]> {
  r
How to Use

Recommended: Install to project (local)

mkdir -p .claude/skills
curl -o .claude/skills/typescript-advanced.md \
  https://raw.githubusercontent.com/rohitg00/awesome-claude-code-toolkit/main/skills/typescript-advanced/SKILL.md

Skill is scoped to this project only. Add .claude/skills/ to your .gitignoreif you don't want to commit it.

Alternative: Clone full repo

git clone https://github.com/rohitg00/awesome-claude-code-toolkit

Then reference at skills/typescript-advanced/SKILL.md

Related Skills