bb-tech-typescript

Enforce strict TypeScript typings and explicit ReturnTypes in services and DTOs.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/valentinmathey/Skills-Back-Automation --skill bb-tech-typescript
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bb-tech-typescript
Source: https://github.com/valentinmathey/Skills-Back-Automation/tree/main/skills/bb-tech-typescript
Command: npx skills add https://github.com/valentinmathey/Skills-Back-Automation --skill bb-tech-typescript

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Mejores prácticas de TypeScript para evitar el uso de any, forzar tipos estrictos y definir ReturnTypes, con el objetivo de mejorar seguridad y mantenibilidad del código.

Core Features & Use Cases

  • Forzar tipado estricto en clases y funciones.
  • Evitar any y usar unknown con validaciones en tiempo de ejecución.
  • Preferir interfaces sobre types para dictionaries y modelos.
  • Incluir ejemplos de ReturnTypes en servicios y utilidades.
  • Use Case: refactorizar DTOs para contratos de API con tipado explícito.

Quick Start

Refactor a central service to replace any with strict types and add runtime validations using a schema library.

Frequently Asked Questions about bb-tech-typescript

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

FAQPage Schema
How do I enforce strict TypeScript types and avoid using any in my codebase?

You can enforce strict TypeScript types by replacing any with unknown and applying runtime validations. This Skill guides you to use explicit ReturnTypes and prefer interfaces over types to establish strong contracts in your DTOs and services.

What is the best way to define explicit ReturnTypes in TypeScript services?

The best way to define explicit ReturnTypes in TypeScript services is to apply strict typings to central business logic and data transfer objects. This enforces strong API contracts and improves overall code maintainability.

How do I refactor TypeScript DTOs to replace any with runtime validation?

Refactor TypeScript DTOs by replacing any with the unknown type and implementing runtime validation patterns using a schema library. This ensures data integrity while maintaining strict type safety for your API contracts.

When should I prefer TypeScript interfaces over types for data models?

Prefer TypeScript interfaces over types when defining dictionaries and data models to ensure strong contracts. This practice is essential for central business logic and data transfer objects where strict type enforcement is required.

Does this strict typing approach work for central business logic and shared utilities?

Yes, enforcing strict TypeScript typings and explicit ReturnTypes works effectively for central business logic, shared utilities, and DTOs. It satisfies requirements for prohibiting any and applying runtime validation where strong contracts are essential.