mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Fix unfold step function return type (#18692)
This commit is contained in:
parent
f6e30f1669
commit
7f30cbcfe9
4
types/ramda/index.d.ts
vendored
4
types/ramda/index.d.ts
vendored
@ -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<T, TResult>(fn: (seed: T) => TResult[] | boolean, seed: T): TResult[];
|
||||
unfold<T, TResult>(fn: (seed: T) => TResult[] | boolean): (seed: T) => TResult[];
|
||||
unfold<T, TResult>(fn: (seed: T) => [TResult, T] | false, seed: T): TResult[];
|
||||
unfold<T, TResult>(fn: (seed: T) => [TResult, T] | false): (seed: T) => TResult[];
|
||||
|
||||
/**
|
||||
* Combines two lists into a set (i.e. no duplicates) composed of the
|
||||
|
||||
@ -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];
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user