typescript

Configure TypeScript projects with strict type safety, patterns, and tooling.

111|18|Updated Dec 17, 2025
One-click install
npx skills add https://github.com/dralgorhythm/claude-agentic-framework --skill typescript-dralgorhythm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript
Source: https://github.com/dralgorhythm/claude-agentic-framework/tree/main/.claude/skills/languages/typescript
Command: npx skills add https://github.com/dralgorhythm/claude-agentic-framework --skill typescript-dralgorhythm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guides TypeScript projects with type patterns, error handling, and tooling.

Core Features & Use Cases

  • Type Patterns: Discriminated unions, branded types, utility types.
  • Error Handling: Result patterns and error propagation.
  • Use Case: Implement a type-safe API client with clear error handling.

Quick Start

Create a minimal TypeScript module with a typed API client.

Frequently Asked Questions about typescript

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

FAQPage Schema
How do I set up strict type safety in a TypeScript project?

Strict type safety in TypeScript enforces compiler flags that catch potential errors at compile time. Enable `strict` mode in tsconfig.json to activate checks like `noImplicitAny`, `strictNullChecks`, and `strictFunctionTypes`. This prevents common runtime errors and forces explicit type annotations across your codebase.

What are discriminated unions and when should I use them?

Discriminated unions are TypeScript types that use a shared literal field to narrow type safety across variants. Use them to model operations with multiple outcomes—like success or failure states—enabling exhaustive type checking and clearer error handling patterns without runtime type guards.

How do I implement robust error handling in TypeScript?

Implement error handling using Result patterns that return either success or error values explicitly typed. This approach avoids throwing exceptions, provides type-safe error propagation, and forces callers to handle failures before accessing successful data, reducing unhandled runtime errors.

Can I use TypeScript with pnpm and Vitest for testing?

Yes. TypeScript integrates with pnpm for dependency management and Vitest for unit testing. This Skill configures both tools within a cohesive workflow, ensuring type-safe tests and fast test execution while maintaining strict type checking across your test suite.

What are branded types and how do they improve type safety?

Branded types use TypeScript's type system to create nominal types that prevent accidental misuse of primitive values. Tag strings or numbers with a unique brand property so the compiler rejects mixing incompatible branded types—for example, distinguishing UserId from OrderId at compile time.

How does Biome integrate with TypeScript development workflows?

Biome provides linting and formatting for TypeScript code as part of this Skill's tooling configuration. It enforces consistent code style, catches potential bugs, and works alongside strict type checking to maintain code quality and readability across your project.