mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-17 22:05:50 +00:00
fix(types): replace all as any with proper type assertions
Eliminate unsafe `as any` casts across 21 non-test source files, replacing them with specific type annotations: - Bridge transport: use StdoutMessage type for write/writeBatch calls - print.ts: type msg.request as Record<string, unknown> for unknown SDK control subtypes; use StdoutMessage for output.enqueue() - API providers (openai/grok/gemini): import ChatCompletion types, type streams as AsyncIterable<ChatCompletionChunk>, type request bodies as ChatCompletionCreateParamsStreaming - Computer use executor: use Partial<ResolvePrepareCaptureResult> for cross-platform screenshot result - Components: replace Ink color string casts with proper typing - Win32 bridge: type stdin as Writable after null check All 2453 tests pass with 0 failures. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -148,7 +148,7 @@ function ServerManagementDialog({ onDone }: Props): React.ReactNode {
|
||||
<Box flexDirection="column" gap={1}>
|
||||
<Text>
|
||||
Remote Control Server is{' '}
|
||||
<Text bold color="green">
|
||||
<Text bold color="success">
|
||||
running
|
||||
</Text>
|
||||
{daemonProcess ? ` (PID: ${daemonProcess.pid})` : ''}
|
||||
@@ -233,10 +233,10 @@ function startDaemon(): void {
|
||||
}
|
||||
});
|
||||
|
||||
child.on('exit', (code, signal) => {
|
||||
child.on('exit', (code: number | null, signal: NodeJS.Signals | null) => {
|
||||
daemonProcess = null;
|
||||
daemonStatus = 'stopped';
|
||||
daemonLogs.push(`[daemon] exited (code=${code}, signal=${signal})`);
|
||||
daemonLogs.push(`[daemon] exited (code=${code ?? 'unknown'}, signal=${signal})`);
|
||||
});
|
||||
|
||||
child.on('error', (err: Error) => {
|
||||
|
||||
Reference in New Issue
Block a user