From 048f16f5aceb1ce92d16085c2e81bdc3ea284cc0 Mon Sep 17 00:00:00 2001 From: Cotton Hou Date: Tue, 23 Jul 2019 03:28:25 +0800 Subject: [PATCH] [ramda] curried R.take gains generic type (#37027) --- types/ramda/index.d.ts | 4 ++-- types/ramda/ramda-tests.ts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) 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"] };