codegen-over-complex-types
π―Skillfrom marius-townhouse/effective-typescript-skills
Generates type definitions from complex schemas, reducing manual type maintenance and compile-time complexity by automating type synchronization with external data sources.
Part of
marius-townhouse/effective-typescript-skills(83 items)
Installation
npx openapi-typescript schema.yaml -o src/api-types.tsnpx prisma generatenpx openapi-typescript schema.yaml -o types.tsnpx graphql-codegennpx json2ts schema.json -o types.ts+ 1 more commands
Skill Details
Use when types become extremely complex. Use when types mirror external schemas. Use when maintaining type-to-schema mappings. Use when types require extensive type-level logic. Use when types drift from data sources.
More from this repository10
Generates TypeScript documentation comments (TSDoc) to explain public APIs, complex types, and provide comprehensive code documentation with IDE tooltips.
Transforms callback-based asynchronous code into clean, readable async/await patterns for better type flow and error handling.
Enables type-safe runtime extension of global objects and DOM elements in TypeScript without sacrificing type checking or using `as any`.
Efficiently initializes multiple TypeScript objects simultaneously using concise object literal syntax and spread operators.
Guides developers through systematic TypeScript module migration, breaking down complex refactoring into manageable, incremental steps.
Explains TypeScript's relationship to JavaScript, highlighting how it adds static typing and catches errors before runtime while remaining fully compatible with JavaScript code.
Generates JavaScript code despite TypeScript type errors and demonstrates that TypeScript types are erased at runtime, requiring alternative type checking strategies.
Helps restore precise type context when extracting values, preventing type inference errors through annotations, const assertions, and type preservation techniques.
Enforces strict string type constraints and prevents unintended string type conversions in TypeScript projects.
Displays and simplifies complex TypeScript types to improve IDE readability and developer experience.