migrate-to-shoehorn

Migrate TypeScript test files from as assertions to @total-typescript/shoehorn helpers.

16|Updated Jun 6, 2026
One-click install
npx skills add https://github.com/Insik-Han/han-monorepo-template --skill migrate-to-shoehorn-insik-han
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate-to-shoehorn
Source: https://github.com/Insik-Han/han-monorepo-template/tree/main/.agents/skills/migrate-to-shoehorn
Command: npx skills add https://github.com/Insik-Han/han-monorepo-template --skill migrate-to-shoehorn-insik-han

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Tests often rely on as type assertions, causing brittle typings and maintenance overhead. This Skill helps migrate them to safer partial data handling with shoehorn.

Core Features & Use Cases

  • Migrate from as to fromPartial/fromAny usage in tests
  • Update imports and improve type safety without production changes
  • Suitable for large test suites with complex objects

Quick Start

Use shoehorn in tests by replacing as Type usages with fromPartial or fromAny, and update imports accordingly.

Frequently Asked Questions about migrate-to-shoehorn

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate TypeScript test assertions from `as` to safer partial data handling?

To migrate TypeScript test assertions, replace `as Type` usages with `fromPartial()` or `fromAny()` helpers from `@total-typescript/shoehorn` and update your test file imports accordingly to improve type safety.

What is the best way to fix brittle typings in a large TypeScript test suite?

Fixing brittle typings in large TypeScript test suites involves migrating away from `as` type assertions to using `@total-typescript/shoehorn` for safer partial data provisioning during edge case testing.

Can I use shoehorn to improve type safety in tests without changing production code?

Yes, you can use `@total-typescript/shoehorn` to improve type safety in tests without production changes by replacing unsafe `as` assertions with `fromPartial()` and `fromAny()` helpers.

When do I need to use `fromPartial` or `fromAny` instead of `as` in TypeScript tests?

You need to use `fromPartial` or `fromAny` instead of `as` when your TypeScript test suite requires safer partial data provisioning for complex objects and edge cases, reducing maintenance overhead from brittle type assertions.

Does migrating test assertions to shoehorn work for complex objects in TypeScript?

Migrating test assertions to `@total-typescript/shoehorn` works for complex objects in TypeScript test suites by utilizing `fromPartial()` and `fromAny()` to safely provision partial data without relying on brittle `as` casts.