LogoClawIndex
案例技能关于
LogoClawIndex

ClawIndex

OpenClaw Skills 与 Use Case 索引

ClawIndex 是一个生态驱动的 OpenClaw Skills 与真实 Use Case 索引站。

索引

Skills·
Cases

Meta

关于·
声明·
邮箱·
GitHub
© 2026 ClawIndex 保留所有权利。

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 项目环境

来源

  • 规范: SKILL.md
typescript
测试
shoehorn
重构
类型安全
安装 @total-typescript/shoehorn 包
查找包含 as 断言的测试文件
将 as Type 替换为 fromPartial
将双重 as 替换为 fromAny
TypeScript 测试文件
用户测试需求
更新后的 TypeScript 测试文件
已安装的 @total-typescript/shoehorn 依赖包