What is understand-type-widening?
Use when confused why TypeScript infers general types. Use when const vs let gives different types. Use when literals become string or number. Source: marius-townhouse/effective-typescript-skills.
Use when confused why TypeScript infers general types. Use when const vs let gives different types. Use when literals become string or number.
Quickly install understand-type-widening AI skill to your development environment via command line
Source: marius-townhouse/effective-typescript-skills.
When TypeScript infers a type from a value, it often widens it.
A variable initialized with "x" could be intended to hold any string, or just the literal "x". TypeScript guesses using heuristics, and understanding these helps you write predictable code.
If TypeScript infers a broader type than you expected, you're seeing widening.
Use when confused why TypeScript infers general types. Use when const vs let gives different types. Use when literals become string or number. Source: marius-townhouse/effective-typescript-skills.
Stable fields and commands for AI/search citations.
npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill understand-type-wideningBrowse more skills from marius-townhouse/effective-typescript-skills
Use when confused why TypeScript infers general types. Use when const vs let gives different types. Use when literals become string or number. Source: marius-townhouse/effective-typescript-skills.
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 understand-type-widening Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw
https://github.com/marius-townhouse/effective-typescript-skills