Skip to content

Commit

Permalink
Update test, casting of resulting array is no longer necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
vidhill committed Nov 11, 2024
1 parent ed6b3c7 commit 534be40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/array-partition/index.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import partition from './index';

// OK
const test1: [number[], number[]] = partition([1, 5, 2, 4, 3], n => n > 3);
const test2: [string[], number[]] = partition(['a', 2, 3, '3'], x => typeof x == 'string') as [string[], number[]]; //if you know better than typescript
const test2: [string[], number[]] = partition(['a', 2, 3, '3'], x => typeof x == 'string');
const test3: [number[], number[]] = partition([1, 2, 3, 4], x => typeof x == 'string');
const test4: [unknown[], unknown[]] = partition([], n => n > 3); // [[], []]

Expand Down

0 comments on commit 534be40

Please sign in to comment.