typescript-strict

Enforce TypeScript strict mode patterns to improve type safety.

710|89|Updated Nov 14, 2021
One-click install
npx skills add https://github.com/citypaul/.dotfiles --skill typescript-strict-citypaul
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-strict
Source: https://github.com/citypaul/.dotfiles/tree/main/claude/.claude/skills/typescript-strict
Command: npx skills add https://github.com/citypaul/.dotfiles --skill typescript-strict-citypaul

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers write safer TypeScript by enforcing strict mode practices, reducing runtime errors and enabling stronger type safety across projects.

Core Features & Use Cases

  • Enforces no implicit any, no type assertions without justification, prefer type over interface for data structures, reserve interface for behavior contracts only.
  • Promotes immutable data patterns, proper use of readonly, and proper dependency injection patterns.
  • Use in code reviews or as a guide when starting new TypeScript projects to maintain consistent conventions.

Quick Start

  • Start by applying the TypeScript strict mode rules to a new or existing project and enable the recommended tsconfig.json settings. For example, run your build with strict true and adjust any type issues flagged by the compiler.

Frequently Asked Questions about typescript-strict

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

FAQPage Schema
How do I enforce TypeScript strict mode patterns in an existing codebase?

To enforce TypeScript strict mode, apply strict rules during development and code review by enabling strict true in tsconfig.json, prohibiting implicit any, and adjusting flagged type issues across modules.

When should I prefer type over interface for TypeScript data structures?

Prefer type over interface for TypeScript data structures to enforce strict type safety, reserving interface exclusively for defining behavior contracts rather than object shapes.

How do I enforce immutability and readonly patterns in TypeScript?

Enforce immutability in TypeScript by applying readonly to applicable data structures and properties, promoting immutable data patterns during refactoring to reduce runtime errors.

Why should I prohibit unchecked type assertions in TypeScript?

Prohibit unchecked type assertions in TypeScript to improve type safety and reduce runtime errors, requiring explicit justification for any type assertions used across modules.

Can I use TypeScript strict mode rules for dependency injection patterns?

Yes, TypeScript strict mode rules support proper dependency injection patterns by enforcing type safety, no implicit any, and consistent strict mode usage across project modules.