mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
Merge pull request #18873 from kujon/ramda_improvements
[ramda] Updated definitions for better type inference + narrower types
This commit is contained in:
6
types/ramda/index.d.ts
vendored
6
types/ramda/index.d.ts
vendored
@@ -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<T>(fn: (a: T) => string | number, list: T[]): { [index: string]: number };
|
||||
countBy<T>(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<T>(fn: (a: any) => Ord, list: T[]): T[];
|
||||
sortBy<T>(fn: (a: T) => Ord, list: T[]): T[];
|
||||
sortBy(fn: (a: any) => Ord): <T>(list: T[]) => T[];
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user