Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.
SkillScore82Maintained
Automatic
◆Coding pack
Last verified 8/20/2026
What it changes
Passed 18 of 22 test cases with the skill, and 17 of 22 without it.
Without skill77%
With skill82%
Checks it passed that the model alone missed
Returns the passed parameter with type T intact
Extracts response type from API endpoint configuration using conditional infer pattern
2 fixed16 passed either way3 still failing1 broke
Pass-rate lift
+5 pp
Tokens
+232%
Agent turns
0%
Response time
-9%
Model gemini-3.6-flashMeasured 8/20/2026v1 · latest is v218 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
This benchmark measured an earlier version of the skill.
See it in action
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 2
Prompt
Write a generic TypeScript function `logLength` that accepts any argument containing a `length` property of type number and logs it. Ensure non-matching types like primitive numbers are rejected at compile time.
What was checked, without and with the skill
Checked
Without skill
With skill
Constrains the generic type parameter with extends clause requiring length property of type number
Passed
Passed
Returns the passed parameter with type T intact
Missed
Passed
case-01 · gemini-3.6-flash · 8/20/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md719 linessingle file
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
Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications. Use when implementing complex type logic, creating reusable type utilities, or ensuring compile-time type safety in TypeScript projects.