From ed2cf925b39b5bdca9527b41541696d8e4bf58fa Mon Sep 17 00:00:00 2001 From: Keagan McClelland Date: Mon, 16 Apr 2018 16:24:02 -0600 Subject: [PATCH] fixed ramda type inference errors (#24942) --- types/ramda/index.d.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index eb4b4569c6..017839933a 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -16,6 +16,7 @@ // Nikita Moshensky // Ethan Resnick // Jack Leigh +// Keagan McClelland // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 @@ -951,10 +952,11 @@ declare namespace R { * Returns a new list, constructed by applying the supplied function to every element of the supplied list. */ map(fn: (x: T) => U, list: ReadonlyArray): U[]; - map(fn: (x: T) => U, obj: Functor): Functor; // used in functors map(fn: (x: T) => U): (list: ReadonlyArray) => U[]; - map(fn: (x: T[keyof T]) => U[keyof T], obj: T): U; - map(fn: (x: T[keyof T]) => U[keyof T]): (obj: T) => U; + map(fn: (x: T[keyof T & keyof U]) => U[keyof T & keyof U], list: T): U; + map(fn: (x: T[keyof T & keyof U]) => U[keyof T & keyof U]): (list: T) => U; + map(fn: (x: T) => U, obj: Functor): Functor; // used in functors + map(fn: (x: T) => U): (obj: Functor) => Functor; // used in functors /** * The mapAccum function behaves like a combination of map and reduce.