Skip to content

Commit

Permalink
fix: type
Browse files Browse the repository at this point in the history
  • Loading branch information
arpowers committed Aug 25, 2022
1 parent ab7d36d commit 57b3741
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion @factor/api/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ export const deepMerge = <T extends Record<string, any>>(
/**
* merges all and concatenates arrays
*/
export const deepMergeAll = <T>(items: (Partial<T> | undefined)[]): T => {
export const deepMergeAll = <T extends Record<string, any>>(
items: (Partial<T> | undefined)[],
): T => {
const i = items.filter(Boolean) as T[]

return deepMerge<T>(i, { mergeArrays: true })
Expand Down

0 comments on commit 57b3741

Please sign in to comment.