Skip to content

Commit 7e3f973

Browse files
R-M-Naveenclaude
andcommitted
fix(atxp): replace no-explicit-any with Record<string, unknown> in polling
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 51771ce commit 7e3f973

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

packages/atxp/src/commands/image.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ export async function imageCommand(prompt: string): Promise<void> {
4848
})) as ToolResult;
4949

5050
const pollText = extractResult(pollResult);
51-
let parsed: any;
51+
let parsed: Record<string, unknown>;
5252
try {
53-
parsed = JSON.parse(pollText);
53+
parsed = JSON.parse(pollText) as Record<string, unknown>;
5454
} catch {
5555
// Non-JSON response — treat as final
5656
spinner.stop();
@@ -66,7 +66,7 @@ export async function imageCommand(prompt: string): Promise<void> {
6666
return;
6767
} else if (parsed.status === 'failed' || parsed.error) {
6868
spinner.fail('Image generation failed');
69-
console.error(chalk.red(parsed.error || JSON.stringify(parsed)));
69+
console.error(chalk.red((parsed.error as string) || JSON.stringify(parsed)));
7070
process.exit(1);
7171
}
7272

packages/atxp/src/commands/music.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ export async function musicCommand(prompt: string): Promise<void> {
4747
})) as ToolResult;
4848

4949
const pollText = extractResult(pollResult);
50-
let parsed: any;
50+
let parsed: Record<string, unknown>;
5151
try {
52-
parsed = JSON.parse(pollText);
52+
parsed = JSON.parse(pollText) as Record<string, unknown>;
5353
} catch {
5454
spinner.stop();
5555
console.log(pollText);
@@ -63,7 +63,7 @@ export async function musicCommand(prompt: string): Promise<void> {
6363
return;
6464
} else if (parsed.status === 'failed' || parsed.error) {
6565
spinner.fail('Music generation failed');
66-
console.error(chalk.red(parsed.error || JSON.stringify(parsed)));
66+
console.error(chalk.red((parsed.error as string) || JSON.stringify(parsed)));
6767
process.exit(1);
6868
}
6969

packages/atxp/src/commands/video.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ export async function videoCommand(prompt: string): Promise<void> {
4747
})) as ToolResult;
4848

4949
const pollText = extractResult(pollResult);
50-
let parsed: any;
50+
let parsed: Record<string, unknown>;
5151
try {
52-
parsed = JSON.parse(pollText);
52+
parsed = JSON.parse(pollText) as Record<string, unknown>;
5353
} catch {
5454
spinner.stop();
5555
console.log(pollText);
@@ -63,7 +63,7 @@ export async function videoCommand(prompt: string): Promise<void> {
6363
return;
6464
} else if (parsed.status === 'failed' || parsed.error) {
6565
spinner.fail('Video generation failed');
66-
console.error(chalk.red(parsed.error || JSON.stringify(parsed)));
66+
console.error(chalk.red((parsed.error as string) || JSON.stringify(parsed)));
6767
process.exit(1);
6868
}
6969

0 commit comments

Comments
 (0)