[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71SV901TDEW5FYDS9JKAY7D":3,"skill-same:01M71SV901TDEW5FYDS9JKAY7D":104},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":55,"ownerHtmlUrl":56,"ownerBlogUrl":57,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M71SV901TDEW5FYDS9JKAY7D","typescript-advanced-types",null,"Master TypeScript's advanced type system - generics, conditional, mapped, template-literal, utility types, inference, and type guards","HigorAlves\u002Forc","HigorAlves","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F11262976?v=4","01M71S79EZEMHZ8PQSV0XQJHYY","Higor Alves","01M71S79FKKTCHCN1EDR8DSTWQ",7,"MIT","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Ftypescript-advanced-types\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"advanced","typescript advanced","types","typescript advanced types","typescript","type system","guards","conditional","for","Utilities","utility","time","Literal","master","use","template","system","Safety","Type Safety","compile","2026-11-10 13:02:02",false,"---\nname: typescript-advanced-types\ndescription: Master TypeScript's advanced type system - generics, conditional, mapped, template-literal, utility types, inference, and type guards\nwhen_to_use: Use for complex type logic, reusable type utilities, or compile-time type safety.\n---\n\n# TypeScript Advanced Types\n\nGuidance for mastering TypeScript's advanced type system — generics, conditional types, mapped types, template literal types, utility types, inference, and type guards — for building robust, type-safe applications.\n\n## When to Use This Skill\n\n- Building type-safe libraries or frameworks\n- Creating reusable generic components\n- Implementing complex type inference logic\n- Designing type-safe API clients\n- Building form validation systems\n- Creating strongly-typed configuration objects\n- Implementing type-safe state management\n- Migrating JavaScript codebases to TypeScript\n\n## How to Use\n\nThis file is a thin index. Identify which topic the task needs from the decision tree below, then **Read the matching `references\u002F\u003Ctopic>.md` file** for the detailed patterns and code. Load only the references you need; for a broad task you may read several.\n\n## Decision Tree\n\n- Need a **reusable, type-flexible function\u002Fclass\u002Fcomponent** (type parameters, constraints, builders, event emitters)? → `references\u002Fgenerics.md`\n- Need a type that **branches on a condition** (`T extends U ? X : Y`, distributive types, API client signatures)? → `references\u002Fconditional-types.md`\n- Need to **transform an existing type's properties** (readonly\u002Fpartial, key remapping, filtering, deep transforms, form validation shapes)? → `references\u002Fmapped-types.md`\n- Need **string-based types** (event handler names, path strings, `Uppercase`\u002F`Capitalize`)? → `references\u002Ftemplate-literal-types.md`\n- Need **built-in helpers** (`Partial`, `Pick`, `Omit`, `Record`, `Exclude`), **discriminated unions**, type testing, best practices, pitfalls, or performance notes? → `references\u002Futility-types.md`\n- Need to **extract\u002Finfer a type** from another (`infer` keyword, element\u002Fpromise\u002Fparameter types)? → `references\u002Finference.md`\n- Need **runtime narrowing** (type guards, `value is T`, `asserts value is T`)? → `references\u002Ftype-guards.md`\n\n## Topic Reference Map\n\n| Topic | Read this file | Covers |\n|-------|----------------|--------|\n| Generics | `references\u002Fgenerics.md` | Generic functions, constraints, multiple type params, typed event emitter, type-safe builder |\n| Conditional types | `references\u002Fconditional-types.md` | Basic\u002Fnested\u002Fdistributive conditionals, `infer` return types, type-safe API client |\n| Mapped types | `references\u002Fmapped-types.md` | Readonly\u002Fpartial\u002Foptional, key remapping, property filtering, deep readonly\u002Fpartial, form validation |\n| Template literal types | `references\u002Ftemplate-literal-types.md` | Template literals, string manipulation, recursive path building |\n| Utility types | `references\u002Futility-types.md` | Built-in utilities, discriminated unions, type testing, best practices, pitfalls, performance |\n| Inference | `references\u002Finference.md` | `infer` keyword — element, promise, and parameter extraction |\n| Type guards | `references\u002Ftype-guards.md` | User-defined type guards and assertion functions |\n\n## Best Practices (summary)\n\nUse `unknown` over `any`; prefer `interface` for object shapes and `type` for unions; lean on inference; build reusable helper types; use const assertions; prefer type guards over assertions; enable strict mode; test your types. Full list with pitfalls and performance considerations lives in `references\u002Futility-types.md`.\n","# TypeScript Advanced Types\n\nGuidance for mastering TypeScript's advanced type system — generics, conditional types, mapped types, template literal types, utility types, inference, and type guards — for building robust, type-safe applications.\n\n## When to Use This Skill\n\n- Building type-safe libraries or frameworks\n- Creating reusable generic components\n- Implementing complex type inference logic\n- Designing type-safe API clients\n- Building form validation systems\n- Creating strongly-typed configuration objects\n- Implementing type-safe state management\n- Migrating JavaScript codebases to TypeScript\n\n## How to Use\n\nThis file is a thin index. Identify which topic the task needs from the decision tree below, then **Read the matching `references\u002F\u003Ctopic>.md` file** for the detailed patterns and code. Load only the references you need; for a broad task you may read several.\n\n## Decision Tree\n\n- Need a **reusable, type-flexible function\u002Fclass\u002Fcomponent** (type parameters, constraints, builders, event emitters)? → `references\u002Fgenerics.md`\n- Need a type that **branches on a condition** (`T extends U ? X : Y`, distributive types, API client signatures)? → `references\u002Fconditional-types.md`\n- Need to **transform an existing type's properties** (readonly\u002Fpartial, key remapping, filtering, deep transforms, form validation shapes)? → `references\u002Fmapped-types.md`\n- Need **string-based types** (event handler names, path strings, `Uppercase`\u002F`Capitalize`)? → `references\u002Ftemplate-literal-types.md`\n- Need **built-in helpers** (`Partial`, `Pick`, `Omit`, `Record`, `Exclude`), **discriminated unions**, type testing, best practices, pitfalls, or performance notes? → `references\u002Futility-types.md`\n- Need to **extract\u002Finfer a type** from another (`infer` keyword, element\u002Fpromise\u002Fparameter types)? → `references\u002Finference.md`\n- Need **runtime narrowing** (type guards, `value is T`, `asserts value is T`)? → `references\u002Ftype-guards.md`\n\n## Topic Reference Map\n\n| Topic | Read this file | Covers |\n|-------|----------------|--------|\n| Generics | `references\u002Fgenerics.md` | Generic functions, constraints, multiple type params, typed event emitter, type-safe builder |\n| Conditional types | `references\u002Fconditional-types.md` | Basic\u002Fnested\u002Fdistributive conditionals, `infer` return types, type-safe API client |\n| Mapped types | `references\u002Fmapped-types.md` | Readonly\u002Fpartial\u002Foptional, key remapping, property filtering, deep readonly\u002Fpartial, form validation |\n| Template literal types | `references\u002Ftemplate-literal-types.md` | Template literals, string manipulation, recursive path building |\n| Utility types | `references\u002Futility-types.md` | Built-in utilities, discriminated unions, type testing, best practices, pitfalls, performance |\n| Inference | `references\u002Finference.md` | `infer` keyword — element, promise, and parameter extraction |\n| Type guards | `references\u002Ftype-guards.md` | User-defined type guards and assertion functions |\n\n## Best Practices (summary)\n\nUse `unknown` over `any`; prefer `interface` for object shapes and `type` for unions; lean on inference; build reusable helper types; use const assertions; prefer type guards over assertions; enable strict mode; test your types. Full list with pitfalls and performance considerations lives in `references\u002Futility-types.md`.\n",{"name":5,"description":7,"when_to_use":49},"Use for complex type logic, reusable type utilities, or compile-time type safety.","main","7522fd7266944e30052204c2f6df287d8b5516be","orc\u002Fskills\u002Ftypescript-advanced-types",0,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc","https:\u002F\u002Forc.novacstack.com\u002F","https:\u002F\u002Fgithub.com\u002FHigorAlves","higoralves.dev","Software Engineering","2026-11-07 07:26:38",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add HigorAlves\u002Forc --skill typescript-advanced-types",{"tool":66,"command":67},"bunx","bunx skills add HigorAlves\u002Forc --skill typescript-advanced-types",{"tool":69,"command":70},"pnpm","pnpm dlx skills add HigorAlves\u002Forc --skill typescript-advanced-types","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Ftypescript-advanced-types\u002FSKILL.md",true,[74,80,84,88,92,96,100],{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fconditional-types.md","REFERENCE","参考文档",2856,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Ftypescript-advanced-types\u002Freferences\u002Fconditional-types.md",{"path":81,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Fgenerics.md",3132,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Ftypescript-advanced-types\u002Freferences\u002Fgenerics.md",{"path":85,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Finference.md",631,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Ftypescript-advanced-types\u002Freferences\u002Finference.md",{"path":89,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Fmapped-types.md",3524,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Ftypescript-advanced-types\u002Freferences\u002Fmapped-types.md",{"path":93,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":94,"sourceHtmlUrl":95},"references\u002Ftemplate-literal-types.md",960,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Ftypescript-advanced-types\u002Freferences\u002Ftemplate-literal-types.md",{"path":97,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":98,"sourceHtmlUrl":99},"references\u002Ftype-guards.md",828,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Ftypescript-advanced-types\u002Freferences\u002Ftype-guards.md",{"path":101,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":102,"sourceHtmlUrl":103},"references\u002Futility-types.md",4347,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Ftypescript-advanced-types\u002Freferences\u002Futility-types.md",[105,141,165,186,208,228],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":122,"publishedAt":44},"01M71SW40F9TAAEDKBYYBCM814","writing-plans","Write a comprehensive implementation plan of bite-sized TDD tasks that an engineer with zero codebase context could execute — exact files, code, tests, and verification steps","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[111,114,119],{"categoryNo":112,"categoryName":113,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":115,"categoryName":116,"taxonomyType":117,"taxonomyTypeDesc":118},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",{"categoryNo":120,"categoryName":121,"taxonomyType":117,"taxonomyTypeDesc":118},"01JBSEEDCAT000000000000036","内容创作者",[123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,32,140,38],"writing","writing plans","plans","engineer","superpowers","implementation plan","files","when","you","code","tasks","verification","plan","write","steps","context","ZeRO","tests",{"skillNo":142,"name":143,"nameZh":6,"description":144,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":145,"categories":146,"keywords":150,"publishedAt":44},"01M71SW15KHE4MHJW9NEXV65X2","writing-for-agents","orc's doctrine layer for writing any document an agent consumes — skills, AGENTS.md\u002FCLAUDE.md, reference docs","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[147,148,149],{"categoryNo":112,"categoryName":113,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":120,"categoryName":121,"taxonomyType":117,"taxonomyTypeDesc":118},[151,123,32,152,130,153,154,155,156,157,158,159,38,160,161,162,163,164],"writing for agents","matt pocock","inline","tuning","a skill","layer","doctrine","push","editing","document","github","https","reference","docs",{"skillNo":166,"name":167,"nameZh":6,"description":168,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":169,"categories":170,"keywords":172,"publishedAt":44},"01M71SVYQKXT743HHHWGHT3G13","workspace-mode","Use when cwd is a parent dir holding multiple sibling git repos — defines repo auto-detection, --repos\u002F--repo\u002F--all-repos\u002F--this-repo precedence, per-repo dispatch, and linked-PR mechanics.","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fworkspace-mode\u002FSKILL.md",[171],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[173,174,175,176,177,130,178,179,180,181,38,182,183,184,185],"workspace mode","mode","workspace","mechanics","auto","repos","git","pr","repo","dispatch","auto-detection","detection","parent",{"skillNo":187,"name":188,"nameZh":6,"description":189,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":190,"categories":191,"keywords":193,"publishedAt":44},"01M71SVVP3BXS06G9395P2K0RH","wizard","Generate an interactive bash wizard walking a human through work only they can perform — credentials, secrets, one-off migrations","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fwizard\u002FSKILL.md",[192],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[188,194,195,196,197,152,130,198,199,200,201,202,203,137,204,205,32,38,206,207],"condition","never","provisioning infrastructure","only","Bash","work","credentials","generate","human","secrets","infrastructure","do","one","interactive",{"skillNo":209,"name":210,"nameZh":6,"description":211,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":212,"categories":213,"keywords":214,"publishedAt":44},"01M71SVT4AR6NKAM5B077E7QSJ","wait-what","Stop and re-pitch — the last message did not land; say it again simply, in the project's own vocabulary.","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fwait-what\u002FSKILL.md",[],[215,216,217,218,219,152,220,221,222,223,161,162,224,225,226,227],"wait what","wait","project","re","true","pitch","last","say","message","land","it","stop","vocabulary",{"skillNo":229,"name":230,"nameZh":6,"description":231,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":232,"categories":233,"keywords":238,"publishedAt":44},"01M71SVQVYRA9QBQ6G8MWR8G6F","vitest","Vitest fast unit testing framework powered by Vite with Jest-compatible API","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fvitest\u002FSKILL.md",[234,237],{"categoryNo":235,"categoryName":236,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":115,"categoryName":116,"taxonomyType":117,"taxonomyTypeDesc":118},[230,239,240,241,242,243,123,130,244,245,246,247,248,249,250,251,252,253,140,254],"coverage","unit","testing","testing framework","generated","api","jest","2026","at","scripts","unit testing","antfu","framework","vite","mocking","dev"]