Files
notification-elements-demo/node_modules/weak-lru-cache/index.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

37 lines
1007 B
TypeScript

interface LRFUExpirerOptions {
lruSize?: number;
cleanupInterval?: number;
}
export class LRFUExpirer {
constructor(options?: LRFUExpirerOptions);
}
interface WeakLRUCacheOptions {
cacheSize?: number;
expirer?: LRFUExpirer | false;
deferRegister?: boolean;
}
export class CacheEntry<V> {
value?: V
deref?(): V
}
export class WeakLRUCache<K, V> extends Map<K, CacheEntry<V>> {
constructor(options?: WeakLRUCacheOptions);
/**
* Get a value from the cache, if it is still in memory. If the value is no longer cached, will return undefined.
* @param key The key to use to retrieve the value
*/
getValue(key: K): V | undefined;
/**
* Put a key-value into the cache
* @param key The key to use to insert the entry
* @param value The value to insert into the cache
* @param expirationPriority A priority for expiration, a higher value will expire sooner
*/
setValue(key: K, value: V, expirationPriority?: number): void;
}