mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-30 03:23:48 +01:00
Fix linting errors
This commit is contained in:
parent
8f77f720e6
commit
fd93c6d338
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user