.opencode/commands/build-fix.md
Fix build and TypeScript errors with minimal changes: $ARGUMENTS
npx tsc --noEmittsc --noEmit after each changeany type (unless absolutely necessary)@ts-ignore comments| Error | Fix |
|---|---|
| Type 'X' is not assignable to type 'Y' | Add correct type annotation |
| Property 'X' does not exist | Add property to interface or fix property name |
| Cannot find module 'X' | Install package or fix import path |
| Argument of type 'X' is not assignable | Cast or fix function signature |
| Object is possibly 'undefined' | Add null check or optional chaining |
After fixes:
npx tsc --noEmit - should show 0 errorsnpm run build - should succeednpm test - tests should still passIMPORTANT: Focus on fixing errors only. No refactoring, no improvements, no architectural changes. Get the build green with minimal diff.