Skip to content

Commit

Permalink
refactor(helpers): remove anys in helpers (improves types)
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavio Corpa committed Jul 20, 2020
1 parent c3de3d5 commit 87c7c26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export const equal = <T, U>(a: T, b: U): boolean =>
* Creates a function that negates the result of the predicate
*/
export const negate = <T>(
predicate: (value?: T, index?: number, list?: T[]) => boolean
): any => (...args) => !predicate(...args)
pred: (...args: readonly T[]) => boolean
): ((...args: readonly T[]) => boolean) => (...args) => !pred(...args)

/**
* Comparer helpers
Expand All @@ -29,7 +29,7 @@ export const composeComparers = <T>(
previousComparer(a, b) || currentComparer(a, b)

export const keyComparer = <T>(
_keySelector: (key: T) => any,
_keySelector: (key: T) => string,
descending?: boolean
): ((a: T, b: T) => number) => (a: T, b: T) => {
const sortKeyA = _keySelector(a)
Expand Down

0 comments on commit 87c7c26

Please sign in to comment.