mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-05-21 11:44:34 +00:00
[ramda] fix R.flatten (#37017)
* fix flatten * fix tests * fool mistake on tests
This commit is contained in:
2
types/ramda/index.d.ts
vendored
2
types/ramda/index.d.ts
vendored
@@ -1405,7 +1405,7 @@ declare namespace R {
|
||||
* Returns a new list by pulling every item out of it (and all its sub-arrays) and putting
|
||||
* them in a new array, depth-first.
|
||||
*/
|
||||
flatten<T>(x: ReadonlyArray<T> | ReadonlyArray<T[]> | ReadonlyArray<ReadonlyArray<T>>): T[];
|
||||
flatten<T>(x: ReadonlyArray<T[]> | ReadonlyArray<ReadonlyArray<T>> | ReadonlyArray<T>): T[];
|
||||
|
||||
/**
|
||||
* Returns a new function much like the supplied one, except that the first two arguments'
|
||||
|
||||
@@ -925,8 +925,8 @@ interface Obj {
|
||||
};
|
||||
|
||||
() => {
|
||||
R.flatten([1, 2, [3, 4], 5, [6, [7, 8, [9, [10, 11], 12]]]]);
|
||||
// => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
||||
R.flatten([[1, 2], [3, 4], [5, 6]]); // => [1, 2, 3, 4, 5, 6]
|
||||
R.flatten([1, 2, 3, 4, 5, 6]); // => [1, 2, 3, 4, 5, 6]
|
||||
};
|
||||
|
||||
() => {
|
||||
|
||||
Reference in New Issue
Block a user