Agent skill · Code Review & Quality

typescript-advanced

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

Rohit Ghumare73,165★ · +3,601/wk · 3 repos on radarProfile →
claude-codeApache-2.0
Install
npx skills add rohitg00/awesome-claude-code-toolkit --skill typescript-advanced --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 4 KB
Bundled scripts: none
Path: skills/typescript-advanced/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 2,438
Language: JavaScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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[]> { return items.reduce((acc, item) => { const key = keyFn(item); (acc[key] ??= []).push(item); return acc; }, {} as Record<K, T[]>); } type ApiResponse<T> = { data: T; meta: { page: number; total: number }; }; async function fetchApi<T>(url: string): Promise<ApiResponse<T>> { const res = await fetch(url); return res.json(); } ``` ## Conditional Types ```typescript type IsString<T> = T extends string ? true : false; type Flatten<T> = T extends Array<infer U> ? U : T; type UnwrapPromise<T> = T extends Promise<infer U> ? UnwrapPromise<U> : T; type FunctionReturn<T> = T extends (...args: any[]) => infer R ? R : never; type ExtractRouteParams<T extends string> = T extends `${string}:${infer Param}/${infer Rest}` ? Param | ExtractRouteParams<Rest> : T extends `${string}:${infer Param}` ? Param : never; type Params = ExtractRouteParams<"/users/:userId/posts/:postId">; ``` ## Ma

What's inside
Steps it walks through
  1. Generics with Constraints
  2. Conditional Types
  3. Mapped Types
  4. Discriminated Unions
  5. Type Guards
  6. Utility Type Combinations
  7. Anti-Patterns
  8. Checklist
More from awesome-claude-code-toolkit
All skills →
About this skill
What does the typescript-advanced skill do?

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

How do I install it?

Run `npx skills add rohitg00/awesome-claude-code-toolkit --skill typescript-advanced --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From rohitg00/awesome-claude-code-toolkit, a repository with 2,438 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going