From 0ea7c7745c6e9a97e6fcf2e7f41257a549f4dfb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Sat, 12 Sep 2026 21:37:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E7=95=99=E5=88=86=E7=A6=BB=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E7=9A=84=E5=BF=85=E8=A6=81=E7=B1=BB=E5=9E=8B=E6=96=AD?= =?UTF-8?q?=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TypeScript 对闭包赋值结果无法完成控制流收窄,恢复断言以通过类型检查。 --- .../ai-game-creator-shell/src/view/ui-editor/useUiEditorPage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/ai-game-creator-shell/src/view/ui-editor/useUiEditorPage.ts b/apps/ai-game-creator-shell/src/view/ui-editor/useUiEditorPage.ts index 5af8a319e..50f26cee6 100644 --- a/apps/ai-game-creator-shell/src/view/ui-editor/useUiEditorPage.ts +++ b/apps/ai-game-creator-shell/src/view/ui-editor/useUiEditorPage.ts @@ -1194,7 +1194,7 @@ export function useUiEditorSession( })); if (separationResult === null) throw new Error('自动切分素材没有返回结果'); - const completedResult = separationResult; + const completedResult = separationResult as SeparationDTO; if (!(await save({ allowDuringSeparation: true }))) { throw new Error( '自动切分素材结果已写入编辑器,但 State 保存失败;sidecar 已保留,可继续恢复。',