three-versions-types

Align package, @types, and TypeScript versions to prevent type errors.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Keep the package version, @types version, and TypeScript version in sync to prevent type errors caused by mismatches.

Core Features & Use Cases

  • Align package, @types, and TypeScript versions to prevent type errors and runtime incompatibilities.
  • Debug and resolve version conflicts when publishing type declarations or working with @types packages.
  • Use this skill to diagnose type-mismatch issues such as "Module has no exported member" caused by out-of-sync typings.

Quick Start

Audit and synchronize your package versions, @types, and TypeScript, then run npm install to apply the changes.

Frequently Asked Questions about three-versions-types

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

FAQPage Schema
How do I fix 'Module has no exported member' errors caused by out of sync @types packages?

Fix 'Module has no exported member' errors by auditing and synchronizing your package versions, @types packages, and TypeScript compiler version to resolve type declaration mismatches. This prevents type errors caused by version misalignment between the library and its typings.

Why do my TypeScript type declarations break when publishing a library?

Type declarations break during publishing because of version misalignment among the package, its @types declarations, and the TypeScript compiler. Keeping package.json, @types, and TypeScript versions in sync ensures compatibility and prevents runtime incompatibilities.

How to keep package.json, @types, and TypeScript versions in sync?

Keep package.json, @types, and TypeScript versions in sync by auditing your dependency tree for version conflicts, applying the necessary version updates, and running npm install to apply the changes and ensure type compatibility.

What is the best way to debug version conflicts with @types packages in TypeScript?

The best way to debug @types version conflicts is to identify version misalignment across the package, its type declarations, and the TypeScript compiler, then update the mismatched versions to restore compatibility.

When do I need to align TypeScript compiler and @types package versions?

You need to align TypeScript compiler and @types package versions when you experience type-mismatch issues or runtime incompatibilities, ensuring that your typings accurately reflect the installed library and compiler capabilities.