diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index 231ee33d03..78fcccd911 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -2816,9 +2816,9 @@ declare namespace R { */ take(n: number, xs: ReadonlyArray): T[]; take(n: number, xs: string): string; - take(n: number): { + take(n: number): { (xs: string): string; - (xs: ReadonlyArray): T[]; + (xs: ReadonlyArray): T[]; }; /** diff --git a/types/ramda/ramda-tests.ts b/types/ramda/ramda-tests.ts index 5815aba1ba..9830398779 100644 --- a/types/ramda/ramda-tests.ts +++ b/types/ramda/ramda-tests.ts @@ -1426,6 +1426,8 @@ type Pair = KeyValuePair; "Eugene Wright", "Gerry Mulligan", "Jack Six", "Alan Dawson", "Darius Brubeck", "Chris Brubeck", "Dan Brubeck", "Bobby Militello", "Michael Moore", "Randy Jones"]; const takeFive = R.take(5); + + // $ExpectType string[] takeFive(members); // => ["Paul Desmond","Bob Bates","Joe Dodge","Ron Crotty","Lloyd Davis"] };