migrate-to-shoehorn

Originally frommattpocock/skills
Installation
SKILL.md

Migrate to Shoehorn

Why shoehorn?

shoehorn lets you pass partial data in tests while keeping TypeScript happy. It replaces as assertions with type-safe alternatives.

Test code only. Never use shoehorn in production code.

Problems with as in tests:

  • Trained not to use it
  • Must manually specify target type
  • Double-as (as unknown as Type) for intentionally wrong data

Install

npm i @total-typescript/shoehorn
Related skills

More from mxyhi/ok-skills

Installs
13
Repository
mxyhi/ok-skills
GitHub Stars
332
First Seen
Apr 29, 2026