From 8408a8d3597ee66b557a80ac65cf85be2653c922 Mon Sep 17 00:00:00 2001 From: icarus Date: Thu, 4 Sep 2025 13:32:28 +0800 Subject: [PATCH] =?UTF-8?q?refactor(serialize):=20=E9=87=8D=E5=91=BD?= =?UTF-8?q?=E5=90=8D=20SerializableValue=20=E4=B8=BA=20SerializablePrimiti?= =?UTF-8?q?ve=20=E4=BB=A5=E6=8F=90=E9=AB=98=E5=8F=AF=E8=AF=BB=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 SerializableValue 类型重命名为 SerializablePrimitive 以更准确地反映其用途,仅包含基本类型 --- src/renderer/src/types/serialize.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/types/serialize.ts b/src/renderer/src/types/serialize.ts index 328868dcfa..a0074b765d 100644 --- a/src/renderer/src/types/serialize.ts +++ b/src/renderer/src/types/serialize.ts @@ -1,6 +1,6 @@ -export type Serializable = null | boolean | number | string | { [key: string]: SerializableValue } | SerializableValue[] +export type Serializable = SerializablePrimitive | { [key: string]: SerializablePrimitive } | SerializablePrimitive[] -type SerializableValue = null | boolean | number | string | { [key: string]: any } | any[] /** +type SerializablePrimitive = null | boolean | number | string /** * 判断一个值是否可序列化(适合用于 Redux 状态) * 支持嵌套对象、数组的深度检测 */