Skip to content

Commit

Permalink
ah types for fp and chains too
Browse files Browse the repository at this point in the history
  • Loading branch information
panzerstadt committed May 8, 2023
1 parent 6fe636f commit 51ce792
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/array.ts
Expand Up @@ -366,7 +366,7 @@ export function shuffle<T>(value: T[]) {
/**
* Returns a tuple separating the items that pass the given truth test.
*/
export function partition<T>(value: T[], callback: (item:T) => boolean) {
export function partition<T>(value: T[], callback: (item: T, index?: number) => boolean) {
const tuple = [[], []] as [T[], T[]]

value.forEach((item, index) => {
Expand Down
2 changes: 1 addition & 1 deletion src/objects/Arrayable.ts
Expand Up @@ -312,7 +312,7 @@ class Arrayable<T> extends Array<T> {
/**
* Returns a tuple separating the items that pass the given truth test.
*/
partition(callback: Function) {
partition(callback: (item: T) => boolean) {
const partitioned = this.constructor.from(Arr.partition(this, callback))
return partitioned.map(item => this.constructor.from(item))
}
Expand Down

0 comments on commit 51ce792

Please sign in to comment.