typescript-pro

Implements advanced TypeScript type systems, type guards, utility types, and strict compiler configurations.

Updated Jun 28, 2026
One-click install
npx skills add https://github.com/412181-HerediaLara/ScaffoldingBE-FE --skill typescript-pro-412181-heredialara
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-pro
Source: https://github.com/412181-HerediaLara/ScaffoldingBE-FE/tree/main/FE/.agents/skills/typescript-pro
Command: npx skills add https://github.com/412181-HerediaLara/ScaffoldingBE-FE --skill typescript-pro-412181-heredialara

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing TypeScript that is genuinely type-safe requires deep knowledge of generics, conditional types, mapped types, and strict compiler settings. This Skill provides structured guidance and reference material for building type-first APIs, eliminating unsafe any usage, and configuring tsconfig for strict, performant builds. ## Core Features & Use Cases - Advanced Type Design: Create branded types, discriminated unions, conditional types, mapped types, and template literal types for domain modeling. - Type Guards & Narrowing: Implement type predicates, assertion functions, and exhaustive switch handling for safe runtime narrowing. - Compiler Configuration: Set up strict tsconfig options, project references, incremental compilation, and declaration file generation for monorepos and libraries. - Use Case: When building a full-stack application, use this Skill to design branded ID types that prevent mixing up UserId and OrderId at compile time, then configure project references so shared types compile incrementally across packages. ## Quick Start Ask the assistant to design a type-safe API client with discriminated union response states and a strict tsconfig for your TypeScript project.

Frequently Asked Questions about typescript-pro

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create branded types in TypeScript?

Create branded types by intersecting a base type with a unique brand property, such as type Brand<T, B> = T & { readonly __brand: B }. This gives nominal typing so UserId and OrderId cannot be accidentally interchanged at compile time.

How to write type guards for discriminated unions in TypeScript?

Write a type predicate function returning 'value is Type' that checks the discriminant property, such as state.status === 'success'. TypeScript then narrows the union automatically inside the guarded block, and exhaustive switches can use a never check for safety.

What tsconfig strict options should I enable for TypeScript?

Enable strict mode plus noUncheckedIndexedAccess, noImplicitOverride, exactOptionalPropertyTypes, and isolatedModules for maximum safety. Pair these with declaration and declarationMap for libraries, and incremental compilation for faster builds.

Does TypeScript project references help monorepo build performance?

Yes, project references with composite: true let TypeScript build packages incrementally and only rebuild changed dependencies. Define references in a root tsconfig and set composite, declaration, and outDir in each package configuration.

When should I avoid using the any type in TypeScript?

Avoid explicit any in all public APIs and domain models because it disables type checking entirely. Use unknown with type guards instead, and reserve as assertions only for cases where the compiler cannot infer a narrowing you have verified.