mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-17 03:44:20 +03:00
add types from ajayyyy/lru-diskcache
- added existing types - disbled no-unused-vars since there is no other way
This commit is contained in:
@@ -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 */
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user