·context-type-inference
</>

context-type-inference

marius-townhouse/effective-typescript-skills

Úselo cuando la extracción de valores cause errores de tipo. Úselo cuando los tipos de devolución de llamada sean incorrectos. Úselo cuando se necesiten afirmaciones constantes.

2Instalaciones·0Tendencia·@marius-townhouse

Instalación

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

SKILL.md

Separating a value from its context can cause type errors.

TypeScript infers types based on both the value AND where it's used. When you extract a value to a variable, you lose context, which can cause surprising type errors.

Note: as const makes it readonly. If the function expects a mutable tuple, this won't work:

Úselo cuando la extracción de valores cause errores de tipo. Úselo cuando los tipos de devolución de llamada sean incorrectos. Úselo cuando se necesiten afirmaciones constantes. Fuente: marius-townhouse/effective-typescript-skills.

Ver original

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 context-type-inference
Categoría
</>Desarrollo
Verificado
Primera vez visto
2026-02-05
Actualizado
2026-02-18

Respuestas rápidas

¿Qué es context-type-inference?

Úselo cuando la extracción de valores cause errores de tipo. Úselo cuando los tipos de devolución de llamada sean incorrectos. Úselo cuando se necesiten afirmaciones constantes. Fuente: marius-townhouse/effective-typescript-skills.

¿Cómo instalo context-type-inference?

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 context-type-inference 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 o Cursor

¿Dónde está el repositorio de origen?

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