·different-variables-types
</>

different-variables-types

Use when tempted to reuse variables. Use when variable changes type. Use when using union types for multiple purposes.

4Installs·0Trend·@marius-townhouse

Installation

$npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill different-variables-types

How to Install different-variables-types

Quickly install different-variables-types AI skill to your development environment via command line

  1. Open Terminal: Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.)
  2. Run Installation Command: Copy and run this command: npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill different-variables-types
  3. Verify Installation: Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw

Source: marius-townhouse/effective-typescript-skills.

SKILL.md

View raw

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.

Union types are harder to work with and obscure the code's intent.

const makes code easier for both humans and TypeScript to understand.

Use when tempted to reuse variables. Use when variable changes type. Use when using union types for multiple purposes. Source: marius-townhouse/effective-typescript-skills.

Facts (cite-ready)

Stable fields and commands for AI/search citations.

Install command
npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill different-variables-types
Category
</>Dev Tools
Verified
First Seen
2026-02-26
Updated
2026-03-11

Browse more skills from marius-townhouse/effective-typescript-skills

Quick answers

What is different-variables-types?

Use when tempted to reuse variables. Use when variable changes type. Use when using union types for multiple purposes. Source: marius-townhouse/effective-typescript-skills.

How do I install different-variables-types?

Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill different-variables-types Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw

Where is the source repository?

https://github.com/marius-townhouse/effective-typescript-skills