diff --git a/src/utils/BlobCache.ts b/src/utils/BlobCache.ts index fed85e91f..e58a9abb6 100644 --- a/src/utils/BlobCache.ts +++ b/src/utils/BlobCache.ts @@ -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]); } diff --git a/src/utils/ImportCache.ts b/src/utils/ImportCache.ts index ab8672b68..9a8383e21 100644 --- a/src/utils/ImportCache.ts +++ b/src/utils/ImportCache.ts @@ -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]; } diff --git a/src/utils/helpers/computeHash.ts b/src/utils/helpers/computeHash.ts index a6c9f45af..f7c1435bb 100644 --- a/src/utils/helpers/computeHash.ts +++ b/src/utils/helpers/computeHash.ts @@ -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(); }