typescript-dev

Enforce strict TypeScript standards with pnpm, TSDoc, and linting.

Updated Aug 16, 2018
One-click install
npx skills add https://github.com/Cain96/dotfiles --skill typescript-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-dev
Source: https://github.com/Cain96/dotfiles/tree/main/dot_config/claude/skills/typescript-dev
Command: npx skills add https://github.com/Cain96/dotfiles --skill typescript-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TypeScript projects benefit from strict typing, better tooling, and clear documentation. This Skill codifies development patterns to improve type safety and maintainability.

Core Features & Use Cases

  • Package Management: Use pnpm as the package manager (no npm/yarn).
  • Type Safety: Enforce strict tsconfig.json, optional chaining, and no usage of any.
  • Documentation: Use TSDoc for public APIs and keep code self-documenting.
  • Code Quality Tools: Linting, testing, and type checking as part of the workflow.

Quick Start

Install dependencies with pnpm, ensure strict mode in tsconfig, and run tests:

  • pnpm install
  • pnpm tsc --noEmit
  • pnpm test -- --coverage

Frequently Asked Questions about typescript-dev

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

FAQPage Schema
How do I set up strict TypeScript type checking for a project?

Enable strict mode in tsconfig.json to enforce strict type checking. This catches null/undefined errors, requires explicit type annotations, and prevents usage of any, improving code safety across your TypeScript project.

What's the best way to maintain TypeScript code quality across a team?

Combine pnpm for consistent dependency management, strict tsconfig configuration, linting, type checking, and tests run together in your workflow. This ensures uniform code standards and catches type errors before code review.

How do I document TypeScript APIs properly?

Use TSDoc comments on public APIs to generate structured documentation alongside your code. TSDoc provides a standardized format for type information, parameters, and return values that integrates with IDE tooling and documentation generators.

Does pnpm work for TypeScript projects requiring strict type safety?

Yes. pnpm is fully compatible with TypeScript projects and provides better dependency isolation and performance. Pair it with strict tsconfig settings, optional chaining, and nullish coalescing for optimal type safety.

Can I use optional chaining and nullish coalescing in TypeScript?

Yes. Optional chaining (?.) and nullish coalescing (??) are ES module features that safely handle null/undefined values. TypeScript supports both when configured with appropriate ES target versions and strict mode enabled.

Why should I avoid using any in TypeScript code?

Using any bypasses TypeScript's type system, defeating strict mode's benefits and hiding potential bugs at compile time. Strict tsconfig configurations help enforce typed alternatives like union types or generics for maintainable, safer code.