·avoid-numeric-index
</>

avoid-numeric-index

Use when defining array-like types. Use when tempted to use number as index type. Use when understanding array keys.

4Installs·0Trend·@marius-townhouse

Installation

$npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill avoid-numeric-index

How to Install avoid-numeric-index

Quickly install avoid-numeric-index 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 avoid-numeric-index
  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

TypeScript's numeric index signatures are a helpful fiction for catching mistakes, but they don't reflect JavaScript's runtime behavior. Use Array, tuple, or ArrayLike types instead.

This is useful for catching mistakes, even though it's not technically accurate.

Pressure: "I need { [n: number]: T } for a sparse array"

Use when defining array-like types. Use when tempted to use number as index type. Use when understanding array keys. 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 avoid-numeric-index
Category
</>Dev Tools
Verified
First Seen
2026-02-26
Updated
2026-03-10

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

Quick answers

What is avoid-numeric-index?

Use when defining array-like types. Use when tempted to use number as index type. Use when understanding array keys. Source: marius-townhouse/effective-typescript-skills.

How do I install avoid-numeric-index?

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 avoid-numeric-index 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