·understand-type-widening
</>

understand-type-widening

Úselo cuando esté confundido sobre por qué TypeScript infiere tipos generales. Úselo cuando const vs let proporcione diferentes tipos. Úselo cuando los literales se conviertan en cadenas o números.

4Instalaciones·0Tendencia·@marius-townhouse

Instalación

$npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill understand-type-widening

Cómo instalar understand-type-widening

Instala rápidamente el skill de IA understand-type-widening en tu entorno de desarrollo mediante línea de comandos

  1. Abrir Terminal: Abre tu terminal o herramienta de línea de comandos (Terminal, iTerm, Windows Terminal, etc.)
  2. Ejecutar comando de instalación: Copia y ejecuta este comando: npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill understand-type-widening
  3. Verificar instalación: Una vez instalado, el skill se configurará automáticamente en tu entorno de programación con IA y estará listo para usar en Claude Code, Cursor u OpenClaw

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

SKILL.md

Ver original

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.

Úselo cuando esté confundido sobre por qué TypeScript infiere tipos generales. Úselo cuando const vs let proporcione diferentes tipos. Úselo cuando los literales se conviertan en cadenas o números. Fuente: marius-townhouse/effective-typescript-skills.

Datos (listos para citar)

Campos y comandos estables para citas de IA/búsqueda.

Comando de instalación
npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill understand-type-widening
Categoría
</>Desarrollo
Verificado
Primera vez visto
2026-02-26
Actualizado
2026-03-11

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

Respuestas rápidas

¿Qué es understand-type-widening?

Úselo cuando esté confundido sobre por qué TypeScript infiere tipos generales. Úselo cuando const vs let proporcione diferentes tipos. Úselo cuando los literales se conviertan en cadenas o números. Fuente: marius-townhouse/effective-typescript-skills.

¿Cómo instalo understand-type-widening?

Abre tu terminal o herramienta de línea de comandos (Terminal, iTerm, Windows Terminal, etc.) Copia y ejecuta este comando: npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill understand-type-widening Una vez instalado, el skill se configurará automáticamente en tu entorno de programación con IA y estará listo para usar en Claude Code, Cursor u OpenClaw

¿Dónde está el repositorio de origen?

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