add types from ajayyyy/lru-diskcache

- added existing types
- disbled no-unused-vars since there is no other way
This commit is contained in:
Michael C
2021-07-05 02:40:17 -04:00
parent 43ae471038
commit 351c89f235

View File

@@ -8,6 +8,7 @@ if (config.diskCache) {
DiskCache.init(); DiskCache.init();
} else { } else {
DiskCache = { DiskCache = {
/* eslint-disable @typescript-eslint/no-unused-vars */
// constructor(rootPath, options): {}; // constructor(rootPath, options): {};
init(): void { return; }, init(): void { return; },
@@ -16,16 +17,17 @@ if (config.diskCache) {
has(key: string): boolean { return false; }, has(key: string): boolean { return false; },
get(key: string, opts): string { return null; }, get(key: string, opts?: {encoding?: string}): string { return null; },
// Returns size // Returns size
set(key: string, dataOrSteam): Promise<number> { return new Promise(() => 0); }, set(key: string, dataOrSteam: string): Promise<number> { return new Promise(() => 0); },
del(key: string): void { return; }, del(key: string): void { return; },
size(): number { return 0; }, size(): number { return 0; },
prune(): void {return; }, prune(): void {return; },
/* eslint-enable @typescript-eslint/no-unused-vars */
}; };
} }