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"
This commit is contained in:
schroda
2024-12-25 17:06:13 +01:00
parent 2a20326c76
commit 2e79f3f0db

2
src/UtilTypes.d.ts vendored
View File

@@ -35,5 +35,5 @@ type TransformRecordToWithDefaultFlag<T extends Record<string, any>> = {
};
type MergeObjectsArray<T extends object[]> = T extends [infer F, ...infer R]
? F & MergeObjects<R extends object[] ? R : []>
? F & MergeObjectsArray<R extends object[] ? R : []>
: {};