From 7139800801b44a31f9be4d5aa317018dec4ad5a8 Mon Sep 17 00:00:00 2001 From: Litrix Date: Tue, 14 Jan 2025 12:13:38 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=B1=BB=E5=9E=8Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/types.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/utils/types.ts b/src/utils/types.ts index 477c8e0..4bb9339 100644 --- a/src/utils/types.ts +++ b/src/utils/types.ts @@ -8,12 +8,11 @@ export type Override< R extends Partial | {} = {}, // HACK 防止ts(2559)错误 O extends keyof T = never, > = Omit & R; -export type ObjectKeyRecord = Record; -export type Rename>> = Omit< - T, - keyof R -> & { - [P in keyof R as NonNullable]: T[P]; +export type Rename< + T extends Record, + R extends Partial>, +> = Omit & { + [P in keyof R as Exclude]: T[P]; // HACK 防止ts(2322)错误 }; export type Nullable = T | null | undefined; export type ComparablePrimitive = Exclude;