Every premium and members-only resource for $9.99/month, as a no-commitment subscription. See the plans

PalateKit

Menu

Request a resource

Describe the resource you are missing in one sentence. We will email you when it is published.

0 / 280

Unlock PalateKit

Unlock everything

Plan

Paying means accepting our terms of sale.

Secure payment by Stripe. Receipts and invoices sent by email.

Welcome back

Sign in to install, download or save this resource. A free account is enough for free resources.

TypeScript types and generics v1.0.0

Use this resource to design precise TypeScript types and fix typing errors

New

  • 594 downloads
  • 115 likes
  • 116 saves

Free

Install with the CLI

In a terminal, from the folder you want:

npx --yes palatekit@latest install typescript-types-refactoring

With no option, the skill goes to ~/.agents/skills/; add --agent claude-code (or codex, cursor…) to target an agent.

First time: connect the CLI with

npx --yes palatekit@latest login

The agent runs tsc, finds the cause of the errors, then replaces any with strict types, using type guards, conditional or mapped types as needed. It checks that each replacement still fits its call sites. You get typed code without any and a passing compiler.

Mostly picked by

Updated November 2, 2026

Card for the “TypeScript types and generics” skill

Details

Generates with
Your agent's model
Licence
MIT

Similar resources

View all

What you get

  • SKILL.md: fixing method, examples of generics and unknown API responses
  • rules/: twelve files on generics, conditional types, mapped types, infer and template literal types

Good fit for

  • Your codebase has many any types to remove
  • A generic rejects an inference you expect

Not for

    Tags

    • typescript
    • generics
    • types
    • any
    • strict

    About

    You say

    “Remove the any types from this API module and type the response with a type guard.”

    Card for the “TypeScript types and generics” skill

    Skill published by mcollina under the MIT license, delivered in its original version.

    Show more

    How to use it

    1. Install the skill in your agent's skills folder
    2. Ask your agent to design precise TypeScript types and fix typing errors
    3. Review and adjust the result

    Content preview

    Files

    • LICENSE1.1 KB
    • NOTICE-PALATEKIT.md0.5 KB
    • rules/array-index-access.md5 KB
    • rules/as-const-typeof.md4.8 KB
    • rules/builder-pattern.md8.3 KB
    • rules/conditional-types.md7.2 KB
    • rules/deep-inference.md7.1 KB
    • rules/error-diagnosis.md8.1 KB
    • rules/function-overloads.md7.7 KB
    • rules/generics-basics.md7.2 KB
    • rules/infer-keyword.md7.4 KB
    • rules/mapped-types.md7.7 KB
    • rules/opaque-types.md7.2 KB
    • rules/template-literal-types.md7.6 KB
    • rules/type-narrowing.md8.9 KB
    • rules/utility-types.md6.8 KB
    • SKILL.md4.5 KB
    • tile.json0.6 KB

    Origin and licence

    Listed unmodified

    Author
    mcollina
    Source
    github.com/mcollina/skills/tree/c75d70dbfbe991d8cec42aeda0b64ff14fbb9ac7/skills/typescript-magician
    Licence
    MIT

    Notice

    « typescript-magician » (mcollina, MIT) livré dans sa version d'origine : fiche en français et en anglais par PalateKit.

    User reviews

    –

    No ratings yet

    Loading reviews…

    Delete your review?

    Your rating and comment will be removed from the page.