refactor: eliminate any types across server and TTS worker
- app.ts: type serveFile context parameter as Hono Context - bets.ts: replace catch(err: any) with err: unknown + narrowing - fight-loop.ts: type pickMatchup style as union literal, replace as any casts with proper result type - tts-worker.ts: import KokoroTTS type, use ProgressInfo inference Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
1ca8a6feb0
commit
010e18fbd3
@@ -103,8 +103,8 @@ betsRouter.post('/place', rateLimit(60_000, 10), async (c) => {
|
||||
odds: bet.oddsAtPlacement,
|
||||
potentialPayout: bet.potentialPayout,
|
||||
})
|
||||
} catch (err: any) {
|
||||
return c.json({ error: err.message }, 400)
|
||||
} catch (err: unknown) {
|
||||
return c.json({ error: err instanceof Error ? err.message : String(err) }, 400)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user