The open source coding agent.
TypeScript
core: allow readJson to be called without explicit type parameter
Dax Raada5c15a23e4b3
diff --git a/packages/opencode/src/util/filesystem.ts b/packages/opencode/src/util/filesystem.tsindex 5c63af0303f..d2f22be5206 100644--- a/packages/opencode/src/util/filesystem.ts+++ b/packages/opencode/src/util/filesystem.ts@@ -30,7 +30,7 @@ export namespace Filesystem {return readFile(p, "utf-8")}- export async function readJson<T>(p: string): Promise<T> {+ export async function readJson<T = any>(p: string): Promise<T> {return JSON.parse(await readFile(p, "utf-8"))}