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:
2
src/UtilTypes.d.ts
vendored
2
src/UtilTypes.d.ts
vendored
@@ -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 : []>
|
||||
: {};
|
||||
|
||||
Reference in New Issue
Block a user