r3bl-ts-utils
Version:
The `r3bl-ts-utils` package is a set of useful TypeScript functions and classes that can be used in Node.js and browser environments. They are inspired by Kotlin stdlib, and Rust to write code as expressions rather than statements, colorized text, powerfu
16 lines (15 loc) • 422 B
TypeScript
import { CacheImpl } from "./cache-impl";
export declare namespace Analytics {
const createInstance: <K>() => KeyHistory<K>;
interface KeyHistory<K> {
update(key: K): void;
purge(key: K): void;
findLRUKey<K, V>(cache: CacheImpl<K, V>): K;
findLFUKey(): K;
}
class Insight {
accessCount: number;
insertionTime: number;
lastAccessTime: number;
}
}