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.
15 lines
461 B
15 lines
461 B
declare module "tiny-lru" {
|
|
class Lru<T = any> {
|
|
constructor(max?: number, ttl?: number);
|
|
|
|
public has(key: string): boolean;
|
|
public get(key: string): T | undefined;
|
|
public set(key: string, value: T, bypass?: boolean): this;
|
|
public clear(): this;
|
|
public delete(key: string): this;
|
|
public evict(): this;
|
|
public keys(): string[];
|
|
}
|
|
export default function factory<T = any>(max?: number, ttl?: number): Lru<T>;
|
|
}
|