Upgrade NSpec, update count interface

This commit is contained in:
Alex Gleason
2024-02-12 10:48:26 -06:00
parent 676bd04229
commit cb80770fc7
10 changed files with 25 additions and 51 deletions

View File

@@ -1,6 +1,6 @@
// deno-lint-ignore-file ban-types
import { LRUCache, type MapCache } from '@/deps.ts';
import { LRUCache } from '@/deps.ts';
type FetchFn<K extends {}, V extends {}, O extends {}> = (key: K, opts: O) => Promise<V>;
@@ -12,7 +12,7 @@ export class SimpleLRU<
K extends {},
V extends {},
O extends {} = FetchFnOpts,
> implements MapCache<K, V, O> {
> {
protected cache: LRUCache<K, V, void>;
constructor(fetchFn: FetchFn<K, V, { signal: AbortSignal }>, opts: LRUCache.Options<K, V, void>) {