typescript-devdependencies

Categorize TypeScript and @types packages into devDependencies in package.json.

Updated Jul 17, 2017
One-click install
npx skills add https://github.com/luyi985/lyi-bash --skill typescript-devdependencies
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-devdependencies
Source: https://github.com/luyi985/lyi-bash/tree/main/ai/skills/typescript-devdependencies
Command: npx skills add https://github.com/luyi985/lyi-bash --skill typescript-devdependencies

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TypeScript and @types files are development-only and should not exist in production dependencies; this skill helps ensure they are properly categorized as devDependencies to keep runtime bundles lean and typings accurate.

Core Features & Use Cases

  • Enforces correct placement of TypeScript and @types in package.json
  • Provides clear guidance and examples for common project setups
  • Helps with library publishing by preserving runtime dependencies separate from type definitions

Quick Start

Move TypeScript and @types into devDependencies and verify with npm install

Frequently Asked Questions about typescript-devdependencies

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

FAQPage Schema
Why should TypeScript and @types packages be in devDependencies in package.json?

TypeScript and @types packages should be in devDependencies because they are development-only tools used for type checking, not runtime execution. Keeping them separate ensures production bundles remain lean and type definitions stay accurate.

How do I move TypeScript and @types into devDependencies during a dependency audit?

To audit and move TypeScript and @types, categorize them under devDependencies in package.json. This skill provides installation commands and example configurations to enforce the separation and verify the updated setup using npm install.

Does separating dependencies from devDependencies matter for library publishing?

Separating dependencies from devDependencies is critical for library publishing. It preserves runtime dependencies separately from type definitions, ensuring consumers install only necessary runtime packages while keeping typings accurate and available.

When do I need to separate TypeScript types from runtime dependencies?

You need to separate TypeScript types from runtime dependencies during initial project setup, library publishing, and dependency audits. This prevents development-only type definitions from inflating production runtime bundles.

What is the best way to keep runtime dependencies lean when using TypeScript?

The best way to keep runtime dependencies lean is to enforce correct placement of TypeScript and @types packages into devDependencies. This ensures type definitions are available during development without adding overhead to production.