mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Move HotbarStore to new format
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
4caf77aec6
commit
acefc037c1
7 files changed
+319
-248
No files matched your search
@@ -14,6 +14,7 @@ interface Iterator<T> extends Iterable<T> {
|
||||
flatMap<U>(fn: (val: T) => U[]): Iterator<U>;
|
||||
concat(src2: IterableIterator<T>): Iterator<T>;
|
||||
join(sep?: string): string;
|
||||
take(count: number): Iterator<T>;
|
||||
}
|
||||
|
||||
function chain<T>(src: IterableIterator<T>): Iterator<T> {
|
||||
@@ -26,6 +27,7 @@ function chain<T>(src: IterableIterator<T>): Iterator<T> {
|
||||
join: (sep) => join(src, sep),
|
||||
collect: (fn) => fn(src),
|
||||
concat: (src2) => chain(concat(src, src2)),
|
||||
take: (count) => chain(take(src, count)),
|
||||
[Symbol.iterator]: () => src,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user