From ed6b3c72ca13575360bd6e12313bafd601fd81ce Mon Sep 17 00:00:00 2001 From: David Hill Date: Tue, 3 Sep 2024 20:22:54 +0100 Subject: [PATCH] Add function override, fixes: https://github.com/angus-c/just/issues/584 --- packages/array-partition/index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/array-partition/index.d.ts b/packages/array-partition/index.d.ts index d6d8e6597..906466946 100644 --- a/packages/array-partition/index.d.ts +++ b/packages/array-partition/index.d.ts @@ -11,4 +11,6 @@ * partition(['a', 1, 2, 'b'], x => typeof x == 'string'); * // => [['a', 'b'], [1, 2]] */ -export default function partition(arr: T[], resolver: (arg: T) => boolean): [T[], T[]] +declare function partition(arr: T[], resolver: (arg: T) => arg is S): [S[], Exclude[]]; +declare function partition(arr: T[], resolver: (arg: T) => boolean): [T[], T[]] +export default partition;