From 2e79f3f0dbe13fe9401f245e8abfabaf8f4f3ef7 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Wed, 25 Dec 2024 17:06:13 +0100 Subject: [PATCH] Fix "MergeObjectsArray" util type Never worked properly due to using a non-existent type for the recursive call. This caused the "withPropsFrom" HOC to not properly type the "sourcePropKeys" which were just all props of the passed component instead of the common keys of the component and the passed "prop sources" --- src/UtilTypes.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UtilTypes.d.ts b/src/UtilTypes.d.ts index 609bd7c4..87aa5030 100644 --- a/src/UtilTypes.d.ts +++ b/src/UtilTypes.d.ts @@ -35,5 +35,5 @@ type TransformRecordToWithDefaultFlag> = { }; type MergeObjectsArray = T extends [infer F, ...infer R] - ? F & MergeObjects + ? F & MergeObjectsArray : {};