/migrate-to-shoehorn
把測試檔裡用 as 做型別斷言的寫法,改成用 @total-typescript/shoehorn 這個套件來產生假資料,讓測試資料只給需要的欄位、不用整個物件硬塞型別。
- 安裝次數
- 50.2 萬
- 專案星數
- 31 萬 ★
- 授權
- MIT
- 專案更新
- 2026-11-01
什麼時候用
測試檔裡有很多 as 斷言想清掉、或要產生只帶部分欄位的測試資料時用。
怎麼裝
npx skills add https://github.com/mattpocock/skills --skill migrate-to-shoehorn安裝前請先看過原文內容。中文說明是 AI 翻譯,不保證安全。
原文
Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.