TypeScript development — use when the user works with TypeScript, type system patterns, generics, Zod, tsconfig, NestJS, branded types, or runtime validation. Covers type system mastery, framework integration, architecture patterns, security, and testing strategies. NOT for Python development (use python-development), NOT for React component patterns or hooks (use react-development), NOT for Next.js framework specifics (use nextjs-development).
npx claudepluginhub viktorbezdek/skillstack --plugin typescript-developmentThis skill uses the workspace's default tool permissions.
A complete TypeScript development skill combining best practices, patterns, and tooling for modern TypeScript development across all application types.
examples/nestjs-typeorm-api/src/app.module.tsexamples/nestjs-typeorm-api/src/main.tsexamples/nestjs-typeorm-api/src/users/dto/create-user.dto.tsexamples/nestjs-typeorm-api/src/users/user.entity.tsexamples/nestjs-typeorm-api/src/users/users.controller.tsexamples/nestjs-typeorm-api/src/users/users.module.tsexamples/nestjs-typeorm-api/src/users/users.service.tsreferences/advanced-patterns-2025.mdreferences/advanced-patterns.mdreferences/advanced-types.mdreferences/configuration.mdreferences/decision-trees.mdreferences/examples.mdreferences/extended-patterns.mdreferences/reference.mdreferences/runtime-validation.mdreferences/security-examples.mdreferences/troubleshooting.mdreferences/typescript-patterns.mdreferences/typescript-standards.mdCompares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Designs, implements, and audits WCAG 2.2 AA accessible UIs for Web (ARIA/HTML5), iOS (SwiftUI traits), and Android (Compose semantics). Audits code for compliance gaps.
A complete TypeScript development skill combining best practices, patterns, and tooling for modern TypeScript development across all application types.
This merged skill provides comprehensive TypeScript guidance covering:
{
"compilerOptions": {
"strict": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noPropertyAccessFromIndexSignature": true
}
}
any Policyunknown for truly unknown types// @ts-expect-error with comment explaining whyimport type { User, Config } from './types';
import { createUser } from './utils';
type AsyncState<T> =
| { status: 'idle' }
| { status: 'loading' }
| { status: 'success'; data: T }
| { status: 'error'; error: Error };
type NonNullableProps<T> = {
[K in keyof T]: NonNullable<T[K]>
};
type ExtractArrayType<T> = T extends (infer U)[] ? U : never;
type StringKeys<T> = Extract<keyof T, string>;
type Mutable<T> = { -readonly [K in keyof T]: T[K] };
type ReadonlyDeep<T> = {
readonly [K in keyof T]: T[K] extends object ? ReadonlyDeep<T[K]> : T[K]
};
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE';
type ApiRoute = `/api/${string}`;
type EventName = `on${Capitalize<string>}`;
declare const __brand: unique symbol;
type Brand<T, B> = T & { [__brand]: B };
type UserId = Brand<string, 'UserId'>;
type Email = Brand<string, 'Email'>;
type SafeSQL = Brand<string, 'SafeSQL'>;
| Requirement | Choice |
|---|---|
| General API validation | Zod |
| OpenAPI/JSON Schema needed | TypeBox |
| Bundle size critical | Valibot |
| Maximum performance | TypeBox with compiled validators |
| Form validation in React | Zod + react-hook-form |
Need to extend primitives/unions? -> Type alias
Need declaration merging? -> Interface
Need mapped types? -> Type alias
Defining object shape? -> Either works, be consistent
External data (API, user input)? -> unknown + validation
Library interop requiring any? -> Use with immediate narrowing
Generic constraint? -> unknown as default
Truly dynamic? -> Consider discriminated union first
Related types with shared operations? -> Generics
Distinct types with different handling? -> Union
Need type preservation through transforms? -> Generics
Fixed set of known types? -> Union
| Pattern | Use Case |
|---|---|
| Discriminated Union | State machines, API responses |
| Branded Types | IDs, validated strings |
| Type Guards | Runtime type checking |
| Assertion Functions | Throwing validation |
| Mapped Types | Transforming object types |
| Conditional Types | Type-level logic |
| Template Literals | String pattern types |
| Result Type | Error handling without exceptions |
| Repository Pattern | Data access abstraction |
| Use Case Pattern | Business logic encapsulation |
See Extended Patterns for detailed code examples including runtime validation, React integration, Clean Architecture, error handling, configuration, and testing patterns.
references/extended-patterns.md - Detailed code examples for all patternsreferences/advanced-types.md - Conditional types, mapped types, template literalsreferences/advanced-patterns-2025.md - Latest TypeScript patternsreferences/runtime-validation.md - Zod, TypeBox, Valibot deep divereferences/decision-trees.md - Type vs interface, validation library choicereferences/configuration.md - tsconfig.json optimizationreferences/troubleshooting.md - Common errors and solutionsreferences/security-examples.md - Branded types, sensitive data patternsreferences/advanced-patterns.md - Builder pattern, typed eventsreferences/typescript-standards.md - Strict mode, naming conventionsreferences/typescript-patterns.md - React Native specific patternsreferences/examples.md - Complete feature implementation examplesreferences/reference.md - Clean Architecture, API patternsscripts/typescript-validator.js - TypeScript configuration validationtemplates/typescript-config.json - Recommended tsconfig.json templateexamples/nestjs-typeorm-api/ - Complete NestJS + TypeORM REST API exampleThis skill targets:
All patterns are compatible with both ESM and CommonJS module systems.