fix: cast signal as unknown first and then cast as AbortSignal

This commit is contained in:
P. Reis 2024-08-12 17:10:39 -03:00
parent 60310e5a83
commit 3b5be4d358

View file

@ -17,7 +17,7 @@ export class SimpleLRU<
constructor(fetchFn: FetchFn<K, V, { signal: AbortSignal }>, opts: LRUCache.Options<K, V, void>) {
this.cache = new LRUCache({
fetchMethod: (key, _staleValue, { signal }) => fetchFn(key, { signal: signal as AbortSignal }),
fetchMethod: (key, _staleValue, { signal }) => fetchFn(key, { signal: signal as unknown as AbortSignal }),
...opts,
});
}