diff --git a/lib/cache/base.ts b/lib/cache/base.ts index 190251329..d66ca87b8 100644 --- a/lib/cache/base.ts +++ b/lib/cache/base.ts @@ -53,7 +53,7 @@ export abstract class BaseCache implements Cache { hits: number; protected countersEnabled: boolean; - protected constructor(cacheName, details, type) { + protected constructor(cacheName: string, details: string, type: string) { this.cacheName = cacheName; this.details = details; this.type = type; @@ -77,7 +77,7 @@ export abstract class BaseCache implements Cache { logger.info(`${this.cacheName} ${this.details}: cache stats: ${this.statString()}`); } - static hash(object): string { + static hash(object: any): string { return getHash(object, HashVersion); } diff --git a/lib/cache/in-memory.ts b/lib/cache/in-memory.ts index ef2631881..7d759c3f1 100644 --- a/lib/cache/in-memory.ts +++ b/lib/cache/in-memory.ts @@ -44,7 +44,7 @@ export class InMemoryCache extends BaseCache { return `${super.statString()}, LRU has ${this.cache.itemCount} item(s) totalling ${this.cache.length} bytes`; } - override async getInternal(key): Promise { + override async getInternal(key: string): Promise { const cached = this.cache.get(key); return {hit: !!cached, data: cached}; } diff --git a/lib/cache/s3.ts b/lib/cache/s3.ts index 5d6d63866..a883c1dfa 100644 --- a/lib/cache/s3.ts +++ b/lib/cache/s3.ts @@ -54,7 +54,7 @@ export class S3Cache extends BaseCache { }); } - override async getInternal(key): Promise { + override async getInternal(key: string): Promise { try { return await this.s3.get(key, this.path); } catch (e) {