Skip to main content

migrate-to-shoehorn

Migrate test casts from `as` to @total-typescript/shoehorn.

소스 정보

저장소
redpanda-data/ui-harness
최근 소스 활동
2026년 5월 27일 14:03
감지된 SKILL.md 언어
영어
스타
34
포크
4

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
migrate-to-shoehorn
description
Migrate test casts from `as` to @total-typescript/shoehorn.
# Migrate to Shoehorn Test code only. Never prod. `@total-typescript/shoehorn` replaces test `as` casts with type-safe helpers for partial data. ## Install ```bash bun add -d @total-typescript/shoehorn ``` ## Patterns `as Type` with partial object -> `fromPartial()`: ```ts import { fromPartial } from "@total-typescript/shoehorn"; getUser(fromPartial({ body: { id: "123" } })); ``` Intentionally invalid data -> `fromPartial()` plus targeted override helper from package docs. Avoid `as unknown as`. ## Workflow 1. Limit to tests: `*.test.*`, `*.spec.*`, fixtures. 2. Find casts: `rg " as |as unknown as"`. 3. Replace one cluster at a time. 4. Run related tests + type check. 5. Keep production files untouched.
GitHub에서 보기