fix(web-admin): fix TypeScript cast error in normalize() for AppVersion

Cast via unknown first to satisfy strict TS type checker:
  ...(raw as unknown as AppVersion)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-03-06 04:54:46 -08:00
parent b63341a464
commit 95d678ad6b
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ import {
/** Normalize version-service response: platform comes back as ANDROID/IOS, fileSize as bigint string */ /** Normalize version-service response: platform comes back as ANDROID/IOS, fileSize as bigint string */
function normalize(raw: Record<string, unknown>): AppVersion { function normalize(raw: Record<string, unknown>): AppVersion {
return { return {
...(raw as AppVersion), ...(raw as unknown as AppVersion),
platform: (raw.platform as string).toLowerCase() as 'android' | 'ios', platform: (raw.platform as string).toLowerCase() as 'android' | 'ios',
fileSize: raw.fileSize != null ? Number(raw.fileSize) : undefined, fileSize: raw.fileSize != null ? Number(raw.fileSize) : undefined,
}; };