typescript-style
/typescript-style
Opisuje konwencje języka TypeScript i JavaScript: typy w publicznym API, unie zamiast enum, unknown zamiast any, JSDoc i nazewnictwo.
- Autor
- ssvinar ↗
- Repozytorium
- senior-agent-skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 05.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 05.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Opisuje konwencje języka TypeScript i JavaScript: typy w publicznym API, unie zamiast enum, unknown zamiast any, JSDoc i nazewnictwo.
Oryginalny opis (EN)
TypeScript and JavaScript language conventions - types on public APIs, interface vs type, unions over enum, unknown over any, JSDoc, immutable updates, Zod-inferred types, naming, logging. Use when writing or reviewing .ts, .tsx, .js, .jsx or .mjs code. Structure and size: lean-code.
Jak działa
- Types
- Immutability
- Input validation
- Naming
- Logging
Podgląd SKILL.md
---
name: typescript-style
description: "TypeScript and JavaScript language conventions - types on public APIs, interface vs type, unions over enum, unknown over any, JSDoc, immutable updates, Zod-inferred types, naming, logging. Use when writing or reviewing .ts, .tsx, .js, .jsx or .mjs code. Structure and size: lean-code."
---
# TypeScript Style
Size limits, React state, hooks, composition, memoization, structure: `lean-code` skill. Error handling: `silent-failure-hunter` agent.
## Types
- Exported functions, shared utilities and public methods declare parameter and return types; locals rely on inference.
- Name an object shape once it repeats instead of retyping it inline.
- `interface` for object shapes that may be extended or implemented; `type` for unions, intersections, tuples, mapped and utility types.
- Component props: a named `interface`, callback props typed. No `React.FC` without a concrete reason.
- String literal unions instead of `enum`, unless interop requires an `enum`.
- No `any` in app code. External data and caught errors are `unknown`; narrow before use (`error instanceof Error ? error.message : fallback`). Use generics when the caller decides the type.
- Plain `.js`/`.jsx`: add JSDoc types where they help and a migration is not practical; keep them true to runtime.
## Immutability
- Never mutate arguments; return a copy (`{ ...user, name }`). Type inputs as `Readonly<T>` where useful.
## Input validation
- Describe external input with a Zod schema and derive its type with `z.infer`. Use top-level formats (`z.email()`), not the deprecated `z.string().email()`.
- Where validation is mandatory: `security` skill.
## Naming
- Components PascalCase; hooks start with `use`; animation timelines camelCase named for intent (`heroRevealTl`).
## Logging
- No `console.log` in production code; use a logging library.
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · ssvinar/senior-agent-skills | 90 | MIT |
| ryoppippi/dotfiles | 95 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki 24184ef32cd7 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 95ts-conventions
Podpowiada konwencje typów w TypeScript: tryb strict, unikanie any i enum, typy zamiast interfejsów, unie i branded types. - 100typescript
Stosuje konwencje TypeScript: branded types, unie dyskryminowane, satisfies zamiast as, const zamiast enum i monorepo. - 100jsdoc
Obsługuje JSDoc, generator dokumentacji dla JavaScript z adnotacjami typów: komentarze jsdoc, wskazówki typów i generowanie dokumentacji API. - 100js-google
Stosuje styl i dobre praktyki JavaScript z oficjalnego Google JavaScript Style Guide przy pisaniu, przeglądzie i refaktoryzacji kodu, w tym ES6, moduły, JSDoc i nazewnictwo. - 100typescript-type-safety
Pilnuje bezpieczeństwa typów w TypeScript: różnica unknown i any, zawężanie null, unie dyskryminowane i typy błędów. - 100typescript
Prowadzi inżynierię JavaScript i TypeScript w ścisłym profilu: unie dyskryminowane, branded types, granice z Zod, ESM i Node, reguły typescript-eslint oraz testy Vitest, MSW i fast-check.