different-variables-types

Installation
SKILL.md

Use Different Variables for Different Types

Overview

Don't reuse variables for different purposes.

In JavaScript, you can assign any value to any variable. But in TypeScript, a variable's type is generally fixed. Using different variables for different concepts improves type safety and code clarity.

When to Use This Skill

  • Reusing a variable name for a different purpose
  • Variables assigned values of different types
  • Union types used just to accommodate reassignment
  • Debugging type errors from variable reuse

The Iron Rule

Installs
14
GitHub Stars
2
First Seen
Feb 3, 2026
different-variables-types — marius-townhouse/effective-typescript-skills