diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index bcc5b732b0..5a8ea8f332 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -1833,8 +1833,8 @@ declare namespace R { * to stop iteration or an array of length 2 containing the value to add to the resulting * list and the seed to be used in the next call to the iterator function. */ - unfold(fn: (seed: T) => TResult[] | boolean, seed: T): TResult[]; - unfold(fn: (seed: T) => TResult[] | boolean): (seed: T) => TResult[]; + unfold(fn: (seed: T) => [TResult, T] | false, seed: T): TResult[]; + unfold(fn: (seed: T) => [TResult, T] | false): (seed: T) => TResult[]; /** * Combines two lists into a set (i.e. no duplicates) composed of the diff --git a/types/ramda/ramda-tests.ts b/types/ramda/ramda-tests.ts index 9dcdb4220e..b5fe8d0e5a 100644 --- a/types/ramda/ramda-tests.ts +++ b/types/ramda/ramda-tests.ts @@ -391,7 +391,7 @@ R.times(i, 5); R.take(2, [1, 2, 3, 4]); // => [1, 2] }); (() => { - function f(n: number) { + function f(n: number): false | [number, number] { return n > 50 ? false : [-n, n + 10]; }