diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index 4d37cccf10..da91603caf 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -422,8 +422,8 @@ declare namespace R { * the list. Note that all keys are coerced to strings because of how * JavaScript objects work. */ - countBy(fn: (a: any) => string | number, list: any[]): any; - countBy(fn: (a: any) => string | number): (list: any[]) => any; + countBy(fn: (a: T) => string | number, list: T[]): { [index: string]: number }; + countBy(fn: (a: T) => string | number): (list: T[]) => { [index: string]: number }; /** * Returns a curried equivalent of the provided function. The curried function has two unusual capabilities. @@ -1588,7 +1588,7 @@ declare namespace R { /** * Sorts the list according to a key generated by the supplied function. */ - sortBy(fn: (a: any) => Ord, list: T[]): T[]; + sortBy(fn: (a: T) => Ord, list: T[]): T[]; sortBy(fn: (a: any) => Ord): (list: T[]) => T[]; /** diff --git a/types/ramda/tslint.json b/types/ramda/tslint.json index 6356421ec0..efa861d7ff 100644 --- a/types/ramda/tslint.json +++ b/types/ramda/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { - "no-construct": false // Required for R.is function testing + "no-construct": false, // Required for R.is function testing + "no-any-union": false } }