Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(cli): resolve repo-wide tsc --noEmit type errors#512

Merged
tmchow merged 1 commit into
mainfrom
tmchow/fix-tsc-type-errors
Apr 5, 2026
Merged

fix(cli): resolve repo-wide tsc --noEmit type errors#512
tmchow merged 1 commit into
mainfrom
tmchow/fix-tsc-type-errors

Conversation

@tmchow
Copy link
Copy Markdown
Collaborator

@tmchow tmchow commented Apr 5, 2026

Summary

  • Missing types: Added @types/js-yaml dev dependency
  • Narrowing: Type-annotated options objects in convert and install commands so agentMode narrows from string to "primary" | "subagent"
  • Permission type: Widened permission record value type in claude-to-opencode.ts to accept nested pattern records, removing four unsafe as casts
  • Target handler casts: Changed as TargetHandler<SpecificBundle>["write"] to as TargetHandler["write"] across all targets — the previous casts were no-ops that didn't resolve the contravariance mismatch against the erased Record<string, TargetHandler> type

Test plan

  • bunx tsc --noEmit passes (0 errors, was 21)
  • bun test passes (586/586)

🤖 Generated with Claude Code

- Add @types/js-yaml for missing declaration file
- Type-annotate options objects in convert/install commands to narrow
  agentMode from string to the expected union literal
- Widen permission record value type to include nested pattern records,
  removing unsafe type assertions in claude-to-opencode converter
- Cast target handler write/convert to TargetHandler (erased generic)
  instead of TargetHandler<SpecificBundle> which didn't fix contravariance

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@tmchow tmchow merged commit 3fa0c81 into main Apr 5, 2026
2 checks passed
@github-actions github-actions Bot mentioned this pull request Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant