mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-14 11:43:50 +01:00
15 lines
328 B
TypeScript
15 lines
328 B
TypeScript
|
import { ScriptUrl } from "../Script/ScriptUrl";
|
||
|
|
||
|
const importCache: { [hash: string]: ScriptUrl[] } = {};
|
||
|
|
||
|
export class ImportCache {
|
||
|
static get(hash: string) {
|
||
|
return importCache[hash];
|
||
|
}
|
||
|
|
||
|
static store(hash: string, value: ScriptUrl[]): void {
|
||
|
if (importCache[hash]) return;
|
||
|
importCache[hash] = value;
|
||
|
}
|
||
|
}
|