Skip to content

Commit

Permalink
Add function override, fixes: #584
Browse files Browse the repository at this point in the history
  • Loading branch information
vidhill committed Sep 3, 2024
1 parent d8c5dd1 commit ed6b3c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/array-partition/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@
* partition(['a', 1, 2, 'b'], x => typeof x == 'string');
* // => [['a', 'b'], [1, 2]]
*/
export default function partition<T>(arr: T[], resolver: (arg: T) => boolean): [T[], T[]]
declare function partition<T, S extends T>(arr: T[], resolver: (arg: T) => arg is S): [S[], Exclude<T, S>[]];
declare function partition<T>(arr: T[], resolver: (arg: T) => boolean): [T[], T[]]
export default partition;

0 comments on commit ed6b3c7

Please sign in to comment.