Files
notification-elements-demo/node_modules/thingies/lib/LruCache.d.ts
Giuliano Silvestro 5d0c9ec7eb Initial commit: notification-elements-demo app
Interactive Angular 19 demo for @sda/notification-elements-ui with
6 sections: Bell & Feed, Notification Center, Inbox, Comments &
Threads, Mention Input, and Full-Featured layout. Includes mock
data, dark mode toggle, and real-time event log.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 21:49:19 +10:00

27 lines
772 B
TypeScript

export declare class LruCache<V> {
protected readonly limit: number;
protected capacity: number;
protected head: LruNode<V> | undefined;
protected tail: LruNode<V> | undefined;
protected map: Record<string, LruNode<V>>;
constructor(limit?: number);
get size(): number;
set(key: string, value: V): void;
get(key: string): V | undefined;
peek(key: string): V | undefined;
has(key: string): boolean;
clear(): void;
keys(): string[];
del(key: string): boolean;
protected pop(node: LruNode<V>): void;
protected push(node: LruNode<V>): void;
}
declare class LruNode<V> {
readonly k: string;
v: V;
l: LruNode<V> | undefined;
r: LruNode<V> | undefined;
constructor(k: string, v: V);
}
export {};