Merge pull request #18873 from kujon/ramda_improvements

[ramda] Updated definitions for better type inference + narrower types
This commit is contained in:
Nathan Shively-Sanders
2017-09-07 10:06:44 -07:00
committed by GitHub
2 changed files with 5 additions and 4 deletions

View File

@@ -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[];
/**

View File

@@ -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
}
}