import { IQuery } from './IQuery'; import { Cache } from './Cache'; export class AnonymousQuery implements IQuery { private readonly _cache: Cache; public constructor(cache: Cache) { this._cache = cache; } get size() { return this._cache.size; } [Symbol.iterator](): IterableIterator<[TKey, TObject]> { return this._cache[Symbol.iterator](); } entries(): IterableIterator<[TKey, TObject]> { return this._cache.entries(); } keys(): IterableIterator { return this._cache.keys(); } lookup(key: TKey): TObject | undefined { return this._cache.lookup(key); } values(): IterableIterator { return this._cache.values(); } }