typescript

Configure strict TypeScript options and adopt modern patterns for safer code.

Updated May 9, 2020
One-click install
npx skills add https://github.com/Fenntasy/dotfiles --skill typescript-fenntasy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript
Source: https://github.com/Fenntasy/dotfiles/tree/main/claude/skills/typescript
Command: npx skills add https://github.com/Fenntasy/dotfiles --skill typescript-fenntasy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TypeScript projects often struggle with insufficient type safety, inconsistent patterns, and brittle tooling setups. This Skill provides a structured approach to enforce strictness, adopt modern TypeScript patterns, and integrate testing and build tooling for production-grade apps.

Core Features & Use Cases

  • Enforces TypeScript strictness via tsconfig.json options to catch errors early.
  • Demonstrates patterns like satisfies and branded types to preserve literal inference and prevent type aliasing mistakes.
  • Covers testing strategies (Vitest/Playwright), performance considerations, security practices, linting, and modular architecture for scalable apps.
  • Use cases include configuring strictness, writing tests, optimizing bundles, reviewing security, and setting up build tooling for production-grade projects.

Quick Start

Enable strict TypeScript options, adopt the satisfies pattern and branded types, and integrate these practices into your tests and build tooling to start safer development.

Frequently Asked Questions about typescript

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

FAQPage Schema
How do I configure TypeScript strictness in tsconfig.json to catch errors early?

To configure TypeScript strictness, enable strict options in your tsconfig.json to catch type errors early. This structured approach enforces type safety and prevents inconsistent patterns in maintainable, production-grade codebases.

What is the satisfies pattern in TypeScript and when should I use it?

The TypeScript satisfies pattern preserves literal type inference while ensuring values match an expected type. Use it to prevent type aliasing mistakes and enforce strict type checks without losing precise type information for safer code.

How do I set up testing and build tooling for a production-grade TypeScript project?

Set up testing and build tooling for a TypeScript project by integrating Vitest for unit tests and Playwright for end-to-end tests. Combine this with robust build configurations and linting to ensure scalable, production-grade applications.

Can I use branded types to prevent type aliasing mistakes in TypeScript?

Yes, you can use branded types in TypeScript to prevent type aliasing mistakes. Branded types create distinct types from primitives, enforcing stricter type safety and ensuring values are not accidentally interchanged at scale.

What's the best way to modernize a TypeScript codebase for maintainability?

The best way to modernize a TypeScript codebase is adopting strict type checks, modular architecture, and modern patterns like satisfies. Integrating comprehensive tests and robust build tooling ensures safer, maintainable code.

Does strict TypeScript type checking work with Vitest and Playwright testing setups?

Yes, strict TypeScript type checking works seamlessly with Vitest and Playwright testing setups. Combining strict tsconfig.json options with comprehensive testing strategies ensures type safety across unit and end-to-end tests.