You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
parttimejob/node_modules/zrender/lib/core/LRU.d.ts

29 lines
651 B

export declare class Entry<T> {
value: T;
key: string | number;
next: Entry<T>;
prev: Entry<T>;
constructor(val: T);
}
export declare class LinkedList<T> {
head: Entry<T>;
tail: Entry<T>;
private _len;
insert(val: T): Entry<T>;
insertEntry(entry: Entry<T>): void;
remove(entry: Entry<T>): void;
len(): number;
clear(): void;
}
export default class LRU<T> {
private _list;
private _maxSize;
private _lastRemovedEntry;
private _map;
constructor(maxSize: number);
put(key: string | number, value: T): T;
get(key: string | number): T;
clear(): void;
len(): number;
}