home / skills / pluginagentmarketplace / custom-plugin-typescript / advanced-types
This skill helps you master advanced TypeScript types including generics, conditionals, and mapped types to build robust type-safe code.
npx playbooks add skill pluginagentmarketplace/custom-plugin-typescript --skill advanced-typesReview the files below or copy the command above to add this skill to your agents.
---
name: advanced-types
description: Advanced TypeScript types including generics, conditionals, and mapped types
sasmp_version: "1.3.0"
bonded_agent: 01-typescript-fundamentals
bond_type: PRIMARY_BOND
---
# Advanced TypeScript Types Skill
## Overview
Master advanced TypeScript type features including generics, conditional types, mapped types, and utility types.
## Topics Covered
### Generics
- Generic functions
- Generic interfaces
- Generic classes
- Generic constraints
- Default type parameters
### Conditional Types
- Conditional type syntax
- Inferring within conditionals
- Distributive conditionals
- Type filtering
- Never in conditionals
### Mapped Types
- Basic mapped types
- Key remapping
- Modifiers (+/-)
- Template literal types
- Recursive types
### Utility Types
- Partial, Required, Readonly
- Pick, Omit, Record
- Extract, Exclude
- ReturnType, Parameters
- Awaited, NonNullable
### Advanced Patterns
- Type guards
- Branded types
- Opaque types
- Variadic tuple types
- Type-level programming
## Prerequisites
- TypeScript fundamentals
- Basic generics understanding
## Learning Outcomes
- Create complex generic types
- Use conditional types effectively
- Build custom utility types
- Apply type-level patterns
This skill teaches advanced TypeScript type features including generics, conditional types, mapped types, and utility types. It focuses on practical patterns for building robust, type-safe APIs and libraries. You will learn how to model complex data, infer types, and perform type-level computation to reduce runtime errors.
The skill inspects and explains advanced type constructs with examples and patterns: generic functions and classes, conditional and distributive types, key remapping in mapped types, and built-in utility types. It shows how to compose and extend types, create custom utilities, and apply type-level programming techniques such as branded or opaque types. Each concept includes constraints, common pitfalls, and idiomatic usage.
Do I need deep TypeScript experience to use this skill?
You should know TypeScript basics and basic generics; the skill builds on those foundations to teach advanced techniques.
Will complex types affect compile performance?
Yes—very deep recursion, heavy distribution, or excessive conditional nesting can slow compilation. Use best practices to mitigate.
Are runtime checks still necessary?
Yes. Types catch many errors at compile time, but runtime validation is still recommended for external inputs.