123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- declare namespace QuickLRU {
- interface Options {
-
- readonly maxSize: number;
- }
- }
- declare class QuickLRU<KeyType extends unknown, ValueType extends unknown>
- implements Iterable<[KeyType, ValueType]> {
-
- readonly size: number;
-
- constructor(options: QuickLRU.Options);
- [Symbol.iterator](): IterableIterator<[KeyType, ValueType]>;
-
- set(key: KeyType, value: ValueType): this;
-
- get(key: KeyType): ValueType | undefined;
-
- has(key: KeyType): boolean;
-
- peek(key: KeyType): ValueType | undefined;
-
- delete(key: KeyType): boolean;
-
- clear(): void;
-
- keys(): IterableIterator<KeyType>;
-
- values(): IterableIterator<ValueType>;
- }
- export = QuickLRU;
|