From 9cfaf7bf7d1ed00cd571ce97f9b737edb670fbdd Mon Sep 17 00:00:00 2001 From: Jarrod Watts Date: Sat, 4 Apr 2026 14:44:17 +1100 Subject: [PATCH] build: fix typescript 6 compatibility --- src/version.ts | 4 ++-- tsconfig.json | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/version.ts b/src/version.ts index a0f5db1..999924e 100644 --- a/src/version.ts +++ b/src/version.ts @@ -148,10 +148,10 @@ function getPathCandidates(command: string): string[] { const pathExt = (process.env.PATHEXT || '.COM;.EXE;.BAT;.CMD') .split(';') - .map((value) => value.trim()) + .map((value: string) => value.trim()) .filter(Boolean); - return [command, ...pathExt.map((suffix) => `${command}${suffix.toLowerCase()}`), ...pathExt.map((suffix) => `${command}${suffix.toUpperCase()}`)]; + return [command, ...pathExt.map((suffix: string) => `${command}${suffix.toLowerCase()}`), ...pathExt.map((suffix: string) => `${command}${suffix.toUpperCase()}`)]; } function resolveClaudeBinaryFromPath(): ClaudeBinaryInfo | null { diff --git a/tsconfig.json b/tsconfig.json index 1388f4c..10fca1f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,6 +3,7 @@ "target": "ES2022", "module": "NodeNext", "moduleResolution": "NodeNext", + "types": ["node"], "outDir": "./dist", "rootDir": "./src", "strict": true,