"use strict";
/* eslint @typescript-eslint/no-explicit-any: 0 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.Global = void 0;
/* eslint @typescript-eslint/explicit-module-boundary-types: 0 */
/**
 * Global variables which can be reference during runtime.
 */
const lodash_1 = require("lodash");
class Global {
    payloads = {};
    add(key, value) {
        const obj = { [key]: value };
        (0, lodash_1.merge)(this.payloads, obj);
        return this;
    }
    get(key) {
        return this.payloads[key];
    }
    keys() {
        return Object.keys(this.payloads);
    }
    static from(global) {
        const created = new Global();
        created.payloads = global.payloads;
        return created;
    }
}
exports.Global = Global;
//# sourceMappingURL=global.js.map