Bump dev (w/ eslint 8) (#4070)

* Bump dev (w/ eslint 8)

* Additional linting

* Additional

* More lint fixes

* Last batch

* Additional

* Cleanups
This commit is contained in:
Jaco
2021-10-17 14:49:26 +03:00
committed by GitHub
parent 806fda67e9
commit 5eb3534d8e
46 changed files with 328 additions and 307 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ function wrapCache (keyStart: string, cache: DeriveCache): DeriveCache {
return {
del: (partial: string): void => cache.del(`${keyStart}${partial}`),
forEach: cache.forEach,
get: <T = any> (partial: string): T | undefined => {
get: <T> (partial: string): T | undefined => {
const key = `${keyStart}${partial}`;
const cached = cache.get<CacheValue<T>>(key);
@@ -40,7 +40,7 @@ function wrapCache (keyStart: string, cache: DeriveCache): DeriveCache {
function clearCache (cache: DeriveCache): void {
// clear all expired values
const now = Date.now();
const all: any[] = [];
const all: string[] = [];
cache.forEach((key: string, { x }: CacheValue<any>): void => {
((now - x) > CHACHE_EXPIRY) && all.push(key);