typescript-pro
Master Advanced TypeScript Architecture and Type Safety
Struggling with complex TypeScript types and generics in production systems. This skill provides expert guidance on enterprise-grade TypeScript architecture, advanced type systems, and strict type safety patterns.
Télécharger le ZIP du skill
Importer dans Claude
Allez dans ParamĂštres â CapacitĂ©s â Skills â Importer un skill
Activez et commencez Ă utiliser
Tester
Utilisation de "typescript-pro". Design a type-safe API client with generic response handling
Résultat attendu:
- Defines generic ApiResponse<T> interface with success/error discrimination
- Implements typed fetch wrapper with request/response type validation
- Creates utility types for endpoint definitions and error types
- Provides example usage with proper type inference and error handling
Utilisation de "typescript-pro". Create a deep readonly utility type for nested objects
Résultat attendu:
- Implements recursive DeepReadonly conditional type
- Handles arrays, objects, and primitive types correctly
- Includes example usage and test cases
- Explains type distribution and inference behavior
Audit de sécurité
SûrPrompt-only skill with no executable code. No security risks detected. The skill provides TypeScript development guidance without accessing filesystem, network, environment variables, or executing external commands.
Score de qualité
Ce que vous pouvez construire
Enterprise Type System Design
Senior architects designing shared type libraries and contracts for large codebases with multiple teams.
Complex Generic Solutions
Developers solving advanced type challenges involving conditional types, mapped types, and type inference edge cases.
Production Type Safety Hardening
Teams migrating codebases to strict TypeScript and eliminating any type violations for production systems.
Essayez ces prompts
Help me configure strict TypeScript for my new project with proper compiler flags and linting rules.
Design a generic function that handles [specific use case] with proper type constraints and inference.
Create a conditional type that [describes complex type transformation] while maintaining type safety.
Review my TypeScript architecture for potential type safety issues and suggest improvements for strict mode compliance.
Bonnes pratiques
- Always enable strict mode and noImplicitAny in tsconfig.json for new projects
- Prefer type inference over explicit annotations when the compiler can infer types correctly
- Use branded types and type guards for runtime validation of data from external sources
- Leverage utility types (Partial, Required, Readonly, Pick, Omit) instead of custom implementations
Ăviter
- Using the 'any' type to bypass type errors instead of properly modeling types
- Suppressing TypeScript errors with @ts-ignore without understanding the root cause
- Duplicating type definitions instead of using utility types or proper generics
- Over-annotating code with types that the compiler can infer automatically