Master enterprise-grade TypeScript development with type-safe patterns, modern tooling, and framework integration.
This skill provides comprehensive guidance for TypeScript 5.9+ development, covering:
- Type System Mastery: Generics, mapped types, conditional types, satisfies operator
- Enterprise Patterns: Error handling, validation with Zod, project architecture
- React Integration: Type-safe components, hooks, state management (Zustand, Redux Toolkit)
- NestJS Development: Scalable APIs, DTOs, authentication, RBAC
- Modern Toolchain: Vite 7, pnpm, ESLint 9 flat config, Vitest
- Cross-Language Insights: TypeScript compared with Java, Python, C#
# Initialize TypeScript project with ESM
pnpm create vite@latest my-app --template vanilla-ts
cd my-app && pnpm install
# Configure strict TypeScript
cat > tsconfig.json << 'EOF'
{
"compilerOptions": {
"target": "ES2024",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true
}
}
EOFUse when:
- Building type-safe React, NestJS, or Node.js applications
- Migrating JavaScript codebases to TypeScript
- Implementing advanced type patterns (generics, mapped types, conditional types)
- Configuring modern TypeScript toolchains
- Designing type-safe API contracts with Zod validation
The recommended way to install this skill across different AI coding agents is using the skilz universal installer.
pip install skilzInstall to user home (available in all projects):
skilz install -g https://github.com/SpillwaveSolutions/mastering-typescript-skillInstall to current project only:
skilz install -g https://github.com/SpillwaveSolutions/mastering-typescript-skill --projectskilz install -g https://github.com/SpillwaveSolutions/mastering-typescript-skill --agent opencodeskilz install -g https://github.com/SpillwaveSolutions/mastering-typescript-skill --agent geminiskilz install -g https://github.com/SpillwaveSolutions/mastering-typescript-skill --agent codex- SKILL.md - Main skill documentation with quick reference
- references/ - Detailed reference documentation
type-system.md- Complete type system guidegenerics.md- Advanced generics patternsenterprise-patterns.md- Error handling, validation, architecturereact-integration.md- React + TypeScript patternsnestjs-integration.md- NestJS API developmenttoolchain.md- Modern build tools configuration
- assets/ - Templates and starter files
tsconfig-template.json- Strict enterprise configeslint-template.js- ESLint 9 flat config
- scripts/ - Utility scripts
validate-setup.sh- Verify TypeScript environment
| Tool | Version | Purpose |
|---|---|---|
| TypeScript | 5.9+ | Type checking and compilation |
| Node.js | 22 LTS | Runtime environment |
| Vite | 7.x | Build tool and dev server |
| pnpm | 9.x | Package manager |
| NestJS | 11.x | Backend framework |
| React | 19.x | Frontend library |
| ESLint | 9.x | Linting with flat config |
| Vitest | 3.x | Testing framework |
- Union and intersection types
- Discriminated unions for type-safe branching
- Type guards and type narrowing
- The
satisfiesoperator for safer type checking - Template literal types
- Generic functions, interfaces, and classes
- Generic constraints with
extends - Mapped types and key remapping
- Conditional types with
infer - Variadic tuple types
- Result/Either types for error handling
- Zod schema validation
- Branded types for domain modeling
- Feature-based project organization
- React: Typed components, hooks, Context API
- NestJS: Controllers, services, DTOs, guards
- State management: Zustand, Redux Toolkit
MIT
Richard Hightower - Based on "Mastering Modern TypeScript" book content