fix: 修复类型问题

This commit is contained in:
claude-code-best
2026-04-10 17:34:01 +08:00
parent e70319e8f5
commit ff03fe7fcb
18 changed files with 70 additions and 56 deletions

View File

@@ -131,10 +131,10 @@ export async function call<T = unknown>(
try {
const stdin = bridgeProc!.stdin
if (stdin) {
const writable = stdin as Writable
const writable = stdin as unknown as Writable
writable.write(JSON.stringify(req) + '\n')
if (typeof writable.flush === 'function') {
writable.flush()
if (typeof (writable as any).flush === 'function') {
(writable as any).flush()
}
}
} catch (err) {
@@ -185,7 +185,7 @@ export function stopBridge(): void {
try {
const stdin = bridgeProc.stdin
if (stdin) {
const writable = stdin as Writable
const writable = stdin as unknown as Writable
if (typeof writable.end === 'function') {
writable.end()
}