Skip to content

Commit

Permalink
switch the overload order and add support for __: Placeholder
Browse files Browse the repository at this point in the history
Co-authored-by: Harris Miller <harrismillerconsulting@gmail.com>
  • Loading branch information
jeysal and Harris-Miller committed Jun 23, 2023
1 parent 7436e44 commit b1522de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion types/groupBy.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
export function groupBy<T, K extends string = string>(fn: (a: T) => K, list: readonly T[]): Partial<Record<K, T[]>>;
import { Placeholder } from './util/tools';

export function groupBy<T, K extends string = string>(fn: (a: T) => K): (list: readonly T[]) => Partial<Record<K, T[]>>;
export function groupBy<T>(__: Placeholder, list: readonly T[]): <K extends string = string>(fn: (a: T) => K) => Partial<Record<K, T[]>>;
export function groupBy<T, K extends string = string>(fn: (a: T) => K, list: readonly T[]): Partial<Record<K, T[]>>;

0 comments on commit b1522de

Please sign in to comment.