From 1f6ad6aee432790dda8552fe4e918377bcd4fdd1 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 27 Jul 2026 12:48:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=BF=E6=8D=A2=20any=20=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E4=B8=BA=20AssetLibraryItem=EF=BC=8C=E6=B6=88?= =?UTF-8?q?=E9=99=A4=20no-explicit-any=20=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hooks/useVoiceMaterials/useVoiceMaterialActions.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/web/src/pages/voice-materials/hooks/useVoiceMaterials/useVoiceMaterialActions.ts b/apps/web/src/pages/voice-materials/hooks/useVoiceMaterials/useVoiceMaterialActions.ts index efa3b580a..23ddf1611 100644 --- a/apps/web/src/pages/voice-materials/hooks/useVoiceMaterials/useVoiceMaterialActions.ts +++ b/apps/web/src/pages/voice-materials/hooks/useVoiceMaterials/useVoiceMaterialActions.ts @@ -7,6 +7,7 @@ import { deleteAsset, uploadAssetDirect, getAssetLibraries, + type AssetLibraryItem, } from "@/api/assets" import { tagAsset, untagAsset } from "@/api/tags" import { type VoiceGender, type VoiceMaterial, buildMetadata } from "../types" @@ -15,7 +16,7 @@ import { getAudioDuration } from "../utils/audio" interface UseVoiceMaterialActionsOptions { voiceLibrary?: { id: string; kind: string } materials: VoiceMaterial[] - createLibMutation: { mutateAsync: () => Promise; isPending: boolean } + createLibMutation: { mutateAsync: () => Promise; isPending: boolean } } /** @@ -57,7 +58,7 @@ export function useVoiceMaterialActions({ queryKey: ["asset-libraries"], queryFn: getAssetLibraries, }) - lib = libs.find((l: any) => l.kind === "voice") + lib = libs.find((l: AssetLibraryItem) => l.kind === "voice") if (!lib) throw new Error("无法创建配音库") }