typescript-advanced
Implement advanced TypeScript types, reusable type utilities, and compile-time contracts with generics, conditional/mapped types, and template literals. Excludes basic syntax, JavaScript, and runtime validation.
- License 许可
- MIT
- 所属仓库
- compozy/compozy
- 最近更新
- 2026-11-15
- Stars
- ★ 2.9k
- Forks
- 187
01 前言 Front Matter
- name
- typescript-advanced
- metadata
- { "author": "Pedro Nauck", "github": "https://github.com/pedronauck", "repository": "https://github.com/pedronauck/skills" }
- description
- Implement advanced TypeScript types, reusable type utilities, and compile-time contracts with generics, conditional/mapped types, and template literals. Excludes basic syntax, JavaScript, and runtime validation.
02 资源文件 4
- 参考文档references/advanced-patterns.md7.5 KB
- 参考文档references/best-practices.md9.0 KB
- 参考文档references/core-concepts.md5.0 KB
- 参考文档references/type-inference.md2.1 KB
03 SKILL.md 正文
TypeScript Advanced Types
Use this skill when generic inference, conditional/mapped types, template literals, or a reusable type utility is the actual problem. Ordinary typed API, form, and state work uses its domain guidance unless advanced type behavior needs attention.
| Concern being changed | Reference |
|---|---|
| Generics, conditional/mapped/template-literal and utility types | references/core-concepts.md |
| Reusable emitters, builders, clients, deep utilities, or discriminated models | references/advanced-patterns.md |
infer, narrowing, assertion functions, and type-contract tests |
references/type-inference.md |
| Compiler configuration, type complexity, and maintainability | references/best-practices.md |
Prefer the simplest type that expresses the contract. Use unknown and real narrowing at untrusted boundaries; preserve discriminants and readonly intent. Let inference handle local values and follow repository conventions for public annotations, interface, and type.
Use the existing tsconfig; reference configurations are examples, not instructions to change it. Add compile-time tests only when type behavior is a product/library contract, using its owning suite. Avoid a new type framework or elaborate generic abstraction for a single ordinary call site. Run the repository's affected typecheck gate.
04 同仓库更多 Skills
security-review
Security code review for vulnerabilities. Use when asked to "security review", "find vulnerabilities", "check for security issues", "audit security", "OWASP review", or review code for injection, XSS, authentication, authorization, cryptography issues. Provides systematic review with confidence-based reporting.
lesson-learned
Extract evidence-backed engineering lessons from recent changes or incidents. Use for requested reflection, lesson updates, or retiring an obsolete workflow rule.
compozy
Operate CompozyOS. Use when working with CompozyOS sessions, agents, native tools, skills, tasks, Loops, Goals, Terminal, desktops and windows, automation, extensions, or configuration. Don't use for unrelated projects.
remotion-upgrade
Upgrade Remotion, and related packages
remotion-studio
Preview a Remotion video
remotion-saas
Build an app with Remotion