migrate-to-shoehorn

Migrate TypeScript `as` assertions to @total-typescript/shoehorn for type-safe testing.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/Jmarques/orford-sur-le-lac_embarcations --skill migrate-to-shoehorn-jmarques
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate-to-shoehorn
Source: https://github.com/Jmarques/orford-sur-le-lac_embarcations/tree/main/.agents/skills/migrate-to-shoehorn
Command: npx skills add https://github.com/Jmarques/orford-sur-le-lac_embarcations --skill migrate-to-shoehorn-jmarques

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @total-typescript/shoehorn, and includes scripts (resource) components.

What problem does it solve?

Migrates test assertions from TypeScript's as syntax to @total-typescript/shoehorn for a more robust testing environment.

Core Features & Use Cases

  • Syntax Migration: Converts as assertions to their type-safe counterparts, reducing potential type errors.
  • Partial Data Testing: Allows passing only parts of an object into tests, simplifying test scenarios.
  • Use Case: When working on unit tests and want to ensure that TypeScript is not raising unnecessary errors on intentionally incorrect data.

Quick Start

Use the migrate-to-shoehorn skill to transform an existing 'as' assertion to a type-safe version in your TypeScript test file.

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 to Shoehorn?

To migrate TypeScript test assertions to Shoehorn, you transform existing `as` syntax assertions into type-safe counterparts. This conversion reduces potential type errors and enables passing partial object data into tests safely.

Why use Shoehorn for TypeScript testing instead of `as` assertions?

Using Shoehorn for TypeScript testing replaces `as` assertions with type-safe counterparts, creating a more robust testing environment. It allows you to pass only parts of an object into tests, simplifying scenarios with intentionally incorrect data.

Can I pass partial object data into TypeScript tests without type errors?

Yes, you can pass partial object data into TypeScript tests without type errors by migrating assertions to Shoehorn. This approach handles partial object data safely, preventing TypeScript from raising unnecessary errors on intentionally incomplete test data.

What is the best way to convert `as` assertions in TypeScript test suites?

The best way to convert `as` assertions in TypeScript test suites is through syntax transformation to Shoehorn. This migration replaces `as` syntax with type-safe counterparts, ensuring a robust testing environment and reducing potential type errors.

Do I need @total-typescript/shoehorn installed to migrate test assertions?

Yes, you need @total-typescript/shoehorn installed to migrate test assertions. This dependency provides the type-safe testing environment required to handle partial object data and replace existing `as` syntax assertions.