type DedupeFilterFn = (el: T) => boolean; type DedupeOptionsBase = { /** * Pass a custom filter function which will be run in O(n) while deduping is going on */ filter_fn?: DedupeFilterFn; }; type DedupeOptionsWithKey> = DedupeOptionsBase & { /** * Deduplicate based on a single property key of T */ key: keyof T; }; type DedupeOptionsNoKey = DedupeOptionsBase; declare function dedupe>(val: T[], opts: DedupeOptionsWithKey): T[]; declare function dedupe(val: T[], opts?: DedupeOptionsNoKey): T[]; export { dedupe, dedupe as default };