avoid-numeric-index

Installation
SKILL.md

Avoid Numeric Index Signatures

Overview

JavaScript object keys are always strings, even for arrays.

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.

When to Use This Skill

  • Defining array-like types
  • Understanding JavaScript's array behavior
  • Choosing between arrays and objects
  • Working with Object.keys on arrays

The Iron Rule

Installs
13
GitHub Stars
2
First Seen
Feb 3, 2026
avoid-numeric-index — marius-townhouse/effective-typescript-skills