diff --git a/src/shared/utils/helpers/dedup-by-property.ts b/src/shared/utils/helpers/dedup-by-property.ts index 618b7b11..7ddb195a 100644 --- a/src/shared/utils/helpers/dedup-by-property.ts +++ b/src/shared/utils/helpers/dedup-by-property.ts @@ -1,7 +1,7 @@ -function dedupByProperty( - collection: T[], - keyFn: (obj: T) => R, -) { +function dedupByProperty< + T extends Record, + R extends number | string | boolean, +>(collection: T[], keyFn: (obj: T) => R) { return collection.reduce( (acc, cur) => { const key = keyFn(cur);