typescript-pro

Designs strict TypeScript types, generics, and NestJS decorators for the iWana neXt monorepo.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/SleyiW/iWana-neXt --skill typescript-pro-sleyiw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-pro
Source: https://github.com/SleyiW/iWana-neXt/tree/main/.agents/skills/typescript-pro
Command: npx skills add https://github.com/SleyiW/iWana-neXt --skill typescript-pro-sleyiw

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Complex typing problems in a large TypeScript monorepo—generics, conditional types, inference failures, and untyped boundaries—slow down development and let runtime errors slip through. This Skill provides expert-level guidance for designing type-safe architectures across shared packages, NestJS APIs, and Next.js apps when standard TypeScript help is not enough. ## Core Features & Use Cases - Advanced Type Design: Builds generics, conditional types, mapped types, and custom utility types with semantic naming and proper constraints. - Monorepo-Wide Type Safety: Applies strict typing conventions across @iwana/shared DTOs, TypeORM entities, React CVA components, NestJS decorators, and Next.js Server/Client Components. - Review Checklist Enforcement: Flags unjustified any, missing return types, non-strict tsconfigs, and missing class-validator or Zod validation at boundaries. - Use Case: When a generic repository method like runInTenantSchema<T> loses type inference across the NestJS API, use this Skill to redesign the generics so tenant-scoped queries stay fully typed end to end. ## Quick Start Ask the assistant to review or redesign the TypeScript types for a specific service, DTO, or shared package in the iWana neXt repo.

Frequently Asked Questions about typescript-pro

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

FAQPage Schema
How do I fix TypeScript generics losing type inference in NestJS services?

Name generics semantically (like TEntity or TPayload), add proper constraints, and declare explicit return types on public service methods. For tenant-scoped database calls, type the generic parameter on functions like runInTenantSchema<T> so inference flows through the call chain.

What TypeScript strict mode settings should a monorepo use?

Enable strict: true in every tsconfig.json across apps and packages. Combine this with explicit return types on public functions, no unjustified any types, and unknown with narrowing instead of any for uncertain values.

Should I use class-validator or Zod for DTO validation?

Use class-validator on DTOs at NestJS boundaries in the API, and Zod at frontend boundaries in Next.js apps. This matches the validation conventions of each framework while keeping external inputs type-safe.

When should I not use advanced TypeScript typing?

Avoid it when you only need JavaScript guidance, when the build pipeline cannot enforce TypeScript, or when the problem is UI/UX design rather than type design. Simpler typing tasks can be handled without advanced generics or conditional types.

How do I type React components using CVA and Radix Primitives?

Extend the Radix Primitive's component props and merge them with CVA's VariantProps to get fully typed variant-driven components. Keep shared component types in the UI package so apps consume consistent interfaces.