LeandroBenjaminL/lend-ai / skills/frontend-type-script
frontend-type-script
UnverifiedTypeScript 5.x strict — tipos, genéricos, satisfies, template literal types. Código tipado que no molesta, ayuda. Trigger: Cuando necesitás tipar componentes, definir interfaces, usar genéricos, o resolver errores de tipos.
Skill: frontend-type-script
TypeScript strict. Que los tipos te ayuden, no que te estorben.
Trigger
- Estás escribiendo una función o componente nuevo
- Un error de tipos no te deja compilar
- Tenés
anyen el código y querés sacarlo - Necesitás un tipo complejo (intersección, unión discriminada, template literal)
Workflow LEND
-
ANALIZAR ├── ¿strict mode está activado? tsconfig.json: strict: true ├── ¿Hay anys? contalos y planeá eliminarlos ├── ¿Los tipos reflejan el dominio o solo repiten la forma de los datos? └── ¿Hay tipos compartidos que deberían estar en una carpeta types/?
-
OFRECER (Menú del Senior) ├── A) Tipado simple — interface + type, sin genéricos complejos ├── B) Tipado genérico — utility types, genéricos, satisfies └── C) Tipado avanzado — template literal types, infer, conditional types
-
ELEGIR → confirmación
-
HACER ├── interface para objetos (extensible), type para uniones y primitivos ├── satisfies para validar que un valor cumple un tipo sin asumirlo ├── as const para objetos literales con tipos exactos ├── discriminated unions para estados (type State = Loading | Success | Error) ├── z. └── stricter: evitar
any, preferirunknownsi no sabés el tipo -
VERIFICAR ├── tsc sin errores (o vite build) ├── No hay anys nuevos └── Los tipos ayudan al autocompletado sin ser una novela
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |