mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 22:35:51 +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:
@@ -122,7 +122,8 @@ function UltraplanSessionDetail({
|
||||
let lastBlock: { name: string; input: unknown } | null = null
|
||||
for (const msg of session.log) {
|
||||
if (msg.type !== 'assistant') continue
|
||||
for (const block of msg.message.content) {
|
||||
const content = msg.message?.content ?? []
|
||||
for (const block of content as Array<{type: string; name: string; input: unknown}>) {
|
||||
if (block.type !== 'tool_use') continue
|
||||
calls++
|
||||
lastBlock = block
|
||||
|
||||
Reference in New Issue
Block a user