TypeScript Language Patterns

Enforce modern TypeScript standards for type safety and code quality.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/ntluong95/agent-skills-statistics --skill typescript-language-patterns-ntluong95
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: TypeScript Language Patterns
Source: https://github.com/ntluong95/agent-skills-statistics/tree/main/.github/skills/typescript/language
Command: npx skills add https://github.com/ntluong95/agent-skills-statistics --skill typescript-language-patterns-ntluong95

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers write more robust, maintainable, and type-safe TypeScript code by enforcing modern best practices and avoiding common pitfalls.

Core Features & Use Cases

  • Type Safety: Ensures data integrity and catches errors at compile time.
  • Code Maintainability: Promotes clear, understandable, and scalable codebases.
  • Use Case: Refactor a legacy JavaScript project to TypeScript, ensuring all types are correctly defined and strict mode is enabled to prevent runtime errors.

Quick Start

Apply strict mode and null safety to the attached TypeScript project configuration.

Frequently Asked Questions about TypeScript Language Patterns

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

FAQPage Schema
What are the best practices for type safety and null safety in TypeScript?

To refactor JavaScript to TypeScript, apply strict mode and null safety configurations to your tsconfig. Correctly define all types and interfaces to prevent runtime errors and ensure data integrity during the migration process.

How do I configure tsconfig for strict mode and type safety?

Configuring tsconfig for strict mode involves enabling strict type checking options to enforce type safety. This setup requires adherence to null safety principles and modern TypeScript standards to catch errors during compilation rather than at runtime.

Why should I avoid 'any' and runtime enums in TypeScript projects?

You should avoid 'any' and runtime enums to maintain type safety and code maintainability. Avoiding 'any' ensures compile-time error checking, while steering clear of runtime enums promotes scalable and robust application development.

Does this TypeScript standards skill apply to projects using generics and interfaces?

Yes, this skill applies to projects utilizing generics, interfaces, unions, and enums. It enforces modern TypeScript standards for maintainability and type safety across all these structures within your codebase.

What is the best way to enforce modern TypeScript standards in a legacy codebase?

The best way to enforce modern TypeScript standards is by applying strict mode and null safety rules to your tsconfig. This approach avoids 'any' types and runtime enums to refactor legacy JavaScript into robust, type-safe TypeScript.