For TypeScript developers tired of as unknown as
Shoehorn Deskas Request, as unknown as Response, as any. The safe ones become fromPartial and fromAny right here; the ones that need judgement get a review.
Paste one TypeScript test file. Your browser finds every type assertion - as, as unknown as, as any and <T> - and rewrites the safe ones: a literal asserted to a type becomes fromPartial, a double assertion becomes fromAny, with the type moved into the generic where nothing else gives it, and the import from @total-typescript/shoehorn merged. It leaves DOM narrowing and casts on values for a decision, and refuses production code. Then the review, and the whole migrated file.
The test file free
The scan free
What the scan found
Every type assertion
The skill's migration checklist
The migrated file free
The safe assertions rewritten by the page - fromPartial where TypeScript gives the value a type, fromPartial<T> where it does not, fromAny for as unknown as - and the shoehorn import added or merged. The casts that need a decision are left exactly as they were.
migrated.test.ts
The review metered
Pricing as soon as the session is ready...
Sign inThe reply could not be read. Here it is as it came back:
Caveats
Caveats
The page's check of this reply
Saved reviews
How it works - and what it cannot see
The scan reads the TypeScript itself: comments, strings, template literals (their ${} parts stay code) and regex literals are masked, every bracket is matched, and each assertion's expression and type are measured exactly - so it rewrites { body: { id: "123" } } as Request into fromPartial({ body: { id: "123" } }) without touching the text around it, and keeps the type as fromPartial<Request> when the value sits in a const with no annotation. It follows the skill: fromPartial for partial data that still type-checks, fromAny for data that is wrong on purpose, fromExact to force the full shape, and shoehorn in test code only.
It cannot tell whether a cast on a value is test data or a real type gap, or which placeholder properties a test never reads - that is the review. The page re-scans the migrated file, so an assertion the rewrite left behind is flagged rather than trusted, and every test keeps its title.