| 1 | interface ExpiringMap<K, V> { |
| 2 | get(key: K): V | undefined |
| 3 | remember(key: K, factory: () => V): V |
| 4 | set(key: K, value: V): void |
| 5 | } |
| 6 | |
| 7 | export function expiringMap<K, V>(duration: number): ExpiringMap<K, V> { |
| 8 | let map = new Map<K, { value: V; expiration: Date }>() |
no outgoing calls
no test coverage detected
searching dependent graphs…