migrate-to-shoehorn - 将测试文件中的 as 断言迁移至 shoehorn
将 TypeScript 测试文件中的 `as` 类型断言迁移为 @total-typescript/shoehorn 函数。
标签
更新于: 2026-09-12能力
典型输入
典型输出
该技能可以做什么
- 安装 @total-typescript/shoehorn 包
- 查找包含 as 断言的测试文件
- 将 as Type 替换为 fromPartial
- 将双重 as 替换为 fromAny
- 添加 shoehorn 导入语句
- 运行类型检查进行验证
输入
- TypeScript 测试文件
- 用户测试需求
输出
- 更新后的 TypeScript 测试文件
- 已安装的 @total-typescript/shoehorn 依赖包
要求
- npm 包管理器
- TypeScript 项目环境
