mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-16 16:37:12 +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();
|
||||
} else {
|
||||
DiskCache = {
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
// constructor(rootPath, options): {};
|
||||
|
||||
init(): void { return; },
|
||||
@@ -16,16 +17,17 @@ if (config.diskCache) {
|
||||
|
||||
has(key: string): boolean { return false; },
|
||||
|
||||
get(key: string, opts): string { return null; },
|
||||
get(key: string, opts?: {encoding?: string}): string { return null; },
|
||||
|
||||
// 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; },
|
||||
|
||||
size(): number { return 0; },
|
||||
|
||||
prune(): void {return; },
|
||||
/* eslint-enable @typescript-eslint/no-unused-vars */
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user