Fix linting errors

This commit is contained in:
theit8514 2021-12-23 23:26:05 -05:00
parent 8f77f720e6
commit fd93c6d338
3 changed files with 4 additions and 4 deletions

@ -2,7 +2,7 @@
const blobCache: { [hash: string]: string } = {};
export class BlobCache {
static get(hash: string) {
static get(hash: string): string {
return blobCache[hash];
}
@ -11,7 +11,7 @@ export class BlobCache {
blobCache[hash] = value;
}
static removeByValue(value: string) {
static removeByValue(value: string): void {
const keys = Object.keys(blobCache).filter((key) => blobCache[key] === value);
keys.forEach((key) => delete blobCache[key]);
}

@ -3,7 +3,7 @@ import { ScriptUrl } from "../Script/ScriptUrl";
const importCache: { [hash: string]: ScriptUrl[] } = {};
export class ImportCache {
static get(hash: string) {
static get(hash: string): ScriptUrl[] {
return importCache[hash];
}

@ -6,7 +6,7 @@ import { sha256 } from "js-sha256";
* @returns The SHA-256 hash in hex
*/
export function computeHash(message: string): string {
var hash = sha256.create();
const hash = sha256.create();
hash.update(message);
return hash.hex();
}