·branded-types

Úselo cuando los tipos primitivos necesiten distinción semántica. Úselo cuando los tipos de cadenas o números tengan significados diferentes. Úselo cuando necesite una escritura nominal.

2Instalaciones·0Tendencia·@marius-townhouse

Instalación

$npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill branded-types

SKILL.md

TypeScript uses structural typing, but sometimes you need nominal typing - values that are distinct because you SAY they are, not because they have different shapes. Brands let you do this without runtime overhead.

You can't actually create a value that is both a string and has a brand property:

Response: Type aliases don't prevent mixing up different string types.

Úselo cuando los tipos primitivos necesiten distinción semántica. Úselo cuando los tipos de cadenas o números tengan significados diferentes. Úselo cuando necesite una escritura nominal. 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 branded-types
Categoría
</>Desarrollo
Verificado
Primera vez visto
2026-02-05
Actualizado
2026-02-18

Respuestas rápidas

¿Qué es branded-types?

Úselo cuando los tipos primitivos necesiten distinción semántica. Úselo cuando los tipos de cadenas o números tengan significados diferentes. Úselo cuando necesite una escritura nominal. Fuente: marius-townhouse/effective-typescript-skills.

¿Cómo instalo branded-types?

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 branded-types 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