fix: resolve TypeScript error in backlog plan loading

Fix type mismatch in loadBacklogPlan where secureFs.readFile with 'utf-8'
encoding returns union type string | Buffer, causing JSON.parse to fail type checking.
Cast raw to string to satisfy TypeScript strict mode.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
DhanushSantosh
2026-01-16 12:33:45 +05:30
parent 6529446281
commit 017ff3ca0a

View File

@@ -77,7 +77,7 @@ export async function loadBacklogPlan(projectPath: string): Promise<StoredBacklo
try {
const filePath = getBacklogPlanPath(projectPath);
const raw = await secureFs.readFile(filePath, 'utf-8');
const parsed = JSON.parse(raw) as StoredBacklogPlan;
const parsed = JSON.parse(raw as string) as StoredBacklogPlan;
if (!parsed?.result?.changes) {
return null;
}