Toolverse
All skills

typescript-advanced-types

by wshobson

Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications. Use when implementing complex type logic, creating reusable type utilities, or ensuring compile-time type

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
wshobson
Category
Frontend
Views
85

About this skill

Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications. Use when implementing complex type logic, creating reusable type utilities, or ensuring compile-time type safety in TypeScript projects.

How to use

  1. Zainstaluj skill typescript-advanced-types w swoim projekcie agenta lub środowisku MCP, dodając go do konfiguracji pluginów JavaScript/TypeScript.

  2. Zapoznaj się z czterema głównymi koncepcjami: generyki (funkcje i komponenty wielokrotnego użytku z zachowaniem bezpieczeństwa typów), typy warunkowe (logika warunkowa na poziomie typów), typy mapowane (transformacja istniejących typów) oraz typy literałów szablonowych (dynamiczne typy oparte na stringach).

  3. Gdy potrzebujesz napisać funkcję generyczną, użyj parametru typu T w nawiasach kątowych, na przykład function identity(value: T): T. Możesz ograniczyć typ za pomocą extends, aby wymagać określonych właściwości lub interfejsów.

  4. Do bardziej złożonych scenariuszy zastosuj typy warunkowe (T extends U ? X : Y) do wnioskowania typów, typy mapowane (type Readonly = { readonly [K in keyof T]: T[K] }) do transformacji, lub typy narzędziowe (Partial, Pick, Record) do zmian struktury typów.

  5. Praktykuj na rzeczywistych przypadkach: buduj biblioteki typu-bezpieczne, migruj kod JavaScript do TypeScript z pełnym typowaniem, projektuj klienty API z typami wnioskowanymi ze schematów, lub twórz systemy walidacji formularzy z typami odbitymi ze struktury danych.

  6. Weryfikuj swoje typy w trakcie kompilacji – TypeScript wyłapie błędy przed uruchomieniem kodu, co zmniejsza liczbę błędów w produkcji.

Related skills

zustand

by lobehub

Zustand state management guide. Use when working with store code (src/store/**), implementing actions, managing state, or creating slices. Triggers on Zustand store development, state management questions, or action implementation.

Frontend
36126

better-icons

by better-auth

Use when working with icons in any project. Provides CLI for searching 200+ icon libraries (Iconify) and retrieving SVGs. Commands: `better-icons search u003cqueryu003e` to find icons, `better-icons get u003cidu003e` to get SVG. Also available as MCP server for AI agents.

Frontend
2037

dev-browser

by SawyerHood

Browser automation with persistent page state. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, or automate browser workflows. Trigger phrases include \

Frontend
38151

google-official-seo-guide

by littleben

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

Frontend
101196

theme-factory

by anthropics

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

Frontend
40139

svg-precision

by dkyazzentwatwa

Deterministic SVG generation, validation, and rendering. Use for icons, diagrams, charts, UI mockups, or technical drawings requiring structural correctness and cross-viewer compatibility.

Frontend
233466