Skip to content

Commit e72d62a

Browse files
committed
fix: typings of iterators
1 parent 5908fd6 commit e72d62a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/core/cache/async/interface.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,20 @@ export default interface AsyncCache<V = unknown, K = string> {
5656
/**
5757
* Returns an iterator by the cache keys
5858
*/
59-
[Symbol.asyncIterator](): AsyncIterableIterator<K>;
59+
[Symbol.asyncIterator](): AsyncIterableIterator<K> | IterableIterator<K>;
6060

6161
/**
6262
* Returns an iterator by the cache keys
6363
*/
64-
keys(): AsyncIterableIterator<K>;
64+
keys(): Promise<AsyncIterableIterator<K> | IterableIterator<K>>;
6565

6666
/**
6767
* Returns an iterator by the cache values
6868
*/
69-
values(): AsyncIterableIterator<V>;
69+
values(): Promise<AsyncIterableIterator<K> | IterableIterator<K>>;
7070

7171
/**
7272
* Returns an iterator from the cache that produces pairs of keys and values
7373
*/
74-
entries(): AsyncIterableIterator<[K, V]>;
74+
entries(): Promise<AsyncIterableIterator<[K, V]> | IterableIterator<[K, V]>>;
7575
}

0 commit comments

Comments
 (0)