mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix remaining type errors
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
dbb9a0f5a8
commit
31a3369dd0
22 files changed
+121
-132
No files matched your search
@@ -10,6 +10,7 @@ interface Iterator<T> extends Iterable<T> {
|
||||
filterMap<U>(fn: (val: T) => Falsy | U): Iterator<U>;
|
||||
find(fn: (val: T) => unknown): T | undefined;
|
||||
collect<U>(fn: (values: Iterable<T>) => U): U;
|
||||
toArray(): T[];
|
||||
map<U>(fn: (val: T) => U): Iterator<U>;
|
||||
flatMap<U>(fn: (val: T) => U[]): Iterator<U>;
|
||||
concat(src2: IterableIterator<T>): Iterator<T>;
|
||||
@@ -26,6 +27,7 @@ function chain<T>(src: IterableIterator<T>): Iterator<T> {
|
||||
find: (fn) => find(src, fn),
|
||||
join: (sep) => join(src, sep),
|
||||
collect: (fn) => fn(src),
|
||||
toArray: () => [...src],
|
||||
concat: (src2) => chain(concat(src, src2)),
|
||||
take: (count) => chain(take(src, count)),
|
||||
[Symbol.iterator]: () => src,
|
||||
|
||||
Reference in new issue
Block a user