diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index ab132df060..c538d555a0 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -1525,9 +1525,9 @@ declare namespace R { * function and passing it an accumulator value and the current value from the array, and * then passing the result to the next call. */ - reduceRight(fn: (acc: TResult, elem: T) => TResult, acc: TResult, list: T[]): TResult; - reduceRight(fn: (acc: TResult, elem: T) => TResult): (acc: TResult, list: T[]) => TResult; - reduceRight(fn: (acc: TResult, elem: T) => TResult, acc: TResult): (list: T[]) => TResult; + reduceRight(fn: (elem: T, acc: TResult) => TResult, acc: TResult, list: T[]): TResult; + reduceRight(fn: (elem: T, acc: TResult) => TResult): (acc: TResult, list: T[]) => TResult; + reduceRight(fn: (elem: T, acc: TResult) => TResult, acc: TResult): (list: T[]) => TResult; /** * Similar to `filter`, except that it keeps only values for which the given predicate diff --git a/types/ramda/ramda-tests.ts b/types/ramda/ramda-tests.ts index 5d8dc09005..0998930d42 100644 --- a/types/ramda/ramda-tests.ts +++ b/types/ramda/ramda-tests.ts @@ -328,7 +328,7 @@ R.times(i, 5); (() => { const pairs = [["a", 1], ["b", 2], ["c", 3]]; - function flattenPairs(acc: [string, number], pair: [string, number]) { + function flattenPairs(pair: [string, number], acc: Array): Array { return acc.concat(pair); } @@ -911,7 +911,7 @@ type Pair = KeyValuePair; () => { const pairs: Pair[] = [["a", 1], ["b", 2], ["c", 3]]; - function flattenPairs(acc: Pair[], pair: Pair): Pair[] { + function flattenPairs(pair: Pair, acc: Array): Array { return acc.concat(pair); }